I'm quite the PHP noob, and that's not going to change - I'm unfortunately not a programmer and don't have the time to become one.
However, my site needs to get done, and I'm running into the problem that I'm using a bit of PHP for includes, to make management a little easier, and since PHP sees the root as a totally different directory than standard HTML, I'm having problems using paths relative to root - since the file that the include ends up in might have a different location than another file using the include.
I think I might have gone about includes a little backwards, since I have a file for each page, and that page includes stuff like header and footer from the include dir. (I've seen examples where people do it the other way around and instead include the content from includes).
Still, I figure there ought to be a way to set a path that all PHP files use, sort of like the "base" href tag.
The alternative is to write the full path to the includes every time I'm referencing a php file, but that's a bit cumbersome and doesn't seem like a particularly elegant solution.
A couple complications - I'm on a hosted service, and while I'm probably going to move, they are quite restrictive. I can't get php_value to work in the .htaccess so either they've locked it down, or they're running PHP as CGI (I think?).
Also, I obviously can't get to the php.ini file, because I don't have access to anything outside my user dir.
Are there any elegant solutions, that don't involve changing massive amounts of paths?
Thanks,
L.
However, my site needs to get done, and I'm running into the problem that I'm using a bit of PHP for includes, to make management a little easier, and since PHP sees the root as a totally different directory than standard HTML, I'm having problems using paths relative to root - since the file that the include ends up in might have a different location than another file using the include.
I think I might have gone about includes a little backwards, since I have a file for each page, and that page includes stuff like header and footer from the include dir. (I've seen examples where people do it the other way around and instead include the content from includes).
Still, I figure there ought to be a way to set a path that all PHP files use, sort of like the "base" href tag.
The alternative is to write the full path to the includes every time I'm referencing a php file, but that's a bit cumbersome and doesn't seem like a particularly elegant solution.
A couple complications - I'm on a hosted service, and while I'm probably going to move, they are quite restrictive. I can't get php_value to work in the .htaccess so either they've locked it down, or they're running PHP as CGI (I think?).
Also, I obviously can't get to the php.ini file, because I don't have access to anything outside my user dir.
Are there any elegant solutions, that don't involve changing massive amounts of paths?
Thanks,
L.