Sunday, 15 August 2010

php - How should I include files from outside of document root? -



php - How should I include files from outside of document root? -

i wanted include pear/mail.php. asked hosting back upwards provide me path, "/usr/local/php-5.3.17/share/pear/". doesn't work independently or document root, , seems can't access upper level directories using "../".

there 2 parent folder document root: /home/www/

you have 2 way

1) including in php.ini

like

; unix: "/path1:/path2" ;include_path = ".:/php/includes" ;window include_path = ".;c:\php\includes;c:\wamp\zendframework-1.11.11\library"

2)add pear directory valid directory in apache config like

<directory "/usr/share/rrdtool/fonts/"> options allowoverride none order allow,deny allow </directory>

php linux hosting

No comments:

Post a Comment