Base URL in PHP

前端 未结 3 1712
爱一瞬间的悲伤
爱一瞬间的悲伤 2021-01-27 23:34

I\'ve got a bit of a dilemma, and it\'s been bothering me for quite some time. I have a local testing server that\'s set up like so: 127.0.0.1/

My website i

3条回答
  •  滥情空心
    2021-01-28 00:14

    There's an easy and cool thing you can do in local server called: Virtual host, which allows you to create subdomain to access your local website without entering subdirectories in the url.

    Example:

    You can do something like the following to access your files:
    mysite.localhost/ which is exactly the same as localhost/mysite/index.php

    In that way, you don't have to worry about subdirectories when moving you website to the online server.

    Links for virtual host:
    WAMP
    XAMPP

提交回复
热议问题