$ _SERVER ['HTTP_USER_AGENT']在本地主机和服务器上有所不同

时间:2019-04-12 00:02:25

标签: php user-agent

为什么会这样?我无法确定PHP中的Firefox版本。

data() {
    return {
      meds: []
    }
  },
  computed: {
    ...mapState({
      medicines: state => state.medicines.all
    })
  },
  created() {
    this.getAllMeds()
    this.printMedicines()
  },
  methods: {
    ...mapActions('medicines', {
      getAllMeds: 'getAll'
    }),
    printMedicines() {
      let medications = this.$store.state.medicines.all.items
      console.log(medications)
    }
  }

Firefox

var_dump($_SERVER['HTTP_USER_AGENT']);

Chrome

localhost: string(78) 
"Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:66.0) Gecko/20100101 <b>Firefox/66.0</b>"

server: string(78) 
"Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:66.0) Gecko/20100101 <b>Firefox/CA4C</b>" 

0 个答案:

没有答案