开发者

how can i reference $_SERVER['DOCUMENT_ROOT'] in a .htaccess file?

开发者 https://www.devze.com 2023-01-08 20:48 出处:网络
How can i reference the document root from within an htaccess file? ie: i currently have php_value auto_prepend_fileC:/wamp/www/hf_latest_desktop/prepend.php

How can i reference the document root from within an htaccess file?

ie:

i currently have

php_value auto_prepend_file  C:/wamp/www/hf_latest_desktop/prepend.php

but i would like

php_value auto_prepend_file  **AUTO_DOC_ROOT**prepend.php

where开发者_开发知识库 '**AUTO_DOC_ROOT**' the root path


You cannot. Apache configuration files do not support this.


You won't need to have an absolute path if the file in question is in PHP's include_path

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号