$_SERVER['REQUEST_URI'] returns full URL instead of path to script

前端 未结 3 1063
死守一世寂寞
死守一世寂寞 2021-01-22 12:52

My PHP app is not working because of $_SERVER[\'REQUEST_URI\'] returns the full url to the script instead of a relative path.

My environment:
Wind

3条回答
  •  离开以前
    2021-01-22 13:09

    Had the same issue recently,
    My solution:
    Firstly check if your http://localhost has the same effect.(which i see i didn't)
    If not then added your virtual host(domains) to /etc/host file.

    Hope this is helpful.

提交回复
热议问题