Site-root relative path doesn't work

后端 未结 5 764
死守一世寂寞
死守一世寂寞 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:19

    I think the easiest way to fix this would be to set your include directory and put all of your files in that.

    In your php.ini file, find this line...

    ini_set('include_path', '/usr/lib/pear');
    

    ...but exchange '/usr/lib/pear' with the path to the folder you would like to keep your documents in. It can be above or below the root directory.

    Then, put all of your include files in there. No matter what level of the directory you are including from, it will look in that directory for them, making include files easy to write.

    Or, you could set the folder path right there in the fuel you are updating. Make sure this is at the top of any php file that has an include. All of your require() functions will look in there first.

提交回复
热议问题