简体   繁体   中英

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

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.

如果有问题的文件在PHP的include_path中,则不需要有绝对路径

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM