Site-root relative path doesn't work

后端 未结 5 820
死守一世寂寞
死守一世寂寞 2021-01-27 21:37

I\'m not understanding this. It\'s screwing up whole site because I\'m using a php template.

Supposedly beginning a link with \'/\' starts me at the root according to ev

5条回答
  •  渐次进展
    2021-01-27 22:22

    Try this:

    require($_SERVER['DOCUMENT_ROOT'].'/cis130/textfiles/php/variables.php');
    

    $_SERVER['DOCUMENT_ROOT'] is how you specify the root directory in php.

提交回复
热议问题