OK, that works, but why do I have to do that at all? All of the hosting companies I've used so far work with relative paths in PHP. Is it a web server/PHP configuration specific to mozdev.org?
--- Chris Neale <[EMAIL PROTECTED]> wrote: > On Friday 28 April 2006 22:35, Eric H. Jung wrote: > > Hi, > > > > I have the following directory structure for a mozdev site: > > > > www/includes/ > > header.php > > footer.php > > ... > > > > www/proto > > test1.html > > test2.html > > ... > > > > In test1.html, when I write: > > > > <?php include "../includes/header.php"; ?> > > > > I get the error: > > > > Warning: main(../includes/header.php): failed to open stream: No > such file > > or directory in > > /mozdev/sandbox/data/helm/htdoc/foxyproxy/www/proto/test1.html on > line 1 > > > > What am I doing wrong? The include works for HTML files at the www/ > > directory: > > > > <?php include "includes/header.php"; ?> > > > > Thanks for any help, > > Eric > > > > How about > include(substr(dirname(__FILE__),0,strrpos(dirname(__FILE__), > '/')) . '/includes/header.php') ? > > -- > > cdn > > -- > > feedback -at- mozdev -dot- org is for comments *not* about a specific > project > > http://gifts-for-free.co.uk > > Extensions for Mozilla-based Applications [ http://cdn.mozdev.org/ ] > _______________________________________________ > Project_owners mailing list > [email protected] > http://mozdev.org/mailman/listinfo/project_owners > _______________________________________________ Project_owners mailing list [email protected] http://mozdev.org/mailman/listinfo/project_owners
