HREF=“” automatically adds to current page URL (in PHP). Can't figure it out

前端 未结 8 965
借酒劲吻你
借酒劲吻你 2020-12-01 11:48

Longtime reader of stackoverflow but first question.

I\'m working with Wordpress (specifically thesis theme) in the custom_functions.php file and am finding for some

8条回答
  •  既然无缘
    2020-12-01 12:36

    A solution that works no matter if you are developing on a local server or live is to add "//" in front of your link. This will effectivly remove the URL of the site you are currently on.

    Example:

    Google.com
    

    This will in output http://localhost/mySite/currentPage/www.google.com

    What you should do instead is this:

    Google.com
    

    This will output www.google.com

提交回复
热议问题