I'm a beginner in PHP, and I've tried to make some code by myself. I've stubled across this problem I can't seem to solve.
When I use the line <? include("/cgi-bin/banner.cgi"); ?> I get an error msg.
Warning: Failed opening '/cgi-bin/banner.cgi' for inclusion (include_path='./:/usr/local/lib/php') in /home/outerfx/outerfx-www/banner.php on line 1
It seems as if the PHP thingie doesn't know how to read from root with /. How do I define this, so that it will be correct?
Yes, that would work if the file I put <?include("../cgi-bin/banner.cgi"); ?> in, is in /home/outerfx/outerfx_www, but I'm using header and footer files for the layout, and all the files retrieve from them, so therefore if the file is in f.ex. /home/outerfx/outerfx_www/things it won't work.
Shouldn't there be a way to specify the include_path variable or something?
[This message has been edited by Trophy (edited January 26, 2001).]
[This message has been edited by Trophy (edited January 26, 2001).]
Hmmmmm, I've flipped through my book and can't seem to find an include command that starts itself at the rootweb. I know that this is easily done in SSI, but we're lookin' at PHP here....and I'm stumped. I'm *sure* there's a way to do it in PHP, but my limited knowledge of the language prevents me from seeing it. Sorry buddy, and good luck.
Well....how in the world does the PHP script know weither to interpret the include as a relative link, or an absolute link? I've only used them with relative links...so naturally I assumed that that's how they worked.
Originally posted by Grizzly: Well....how in the world does the PHP script know weither to interpret the include as a relative link, or an absolute link? I've only used them with relative links...so naturally I assumed that that's how they worked.
Well with absolute linking at least on the server side couldn't you just give the location right from the c:/ to the file?
------------------
Kill em all and let God sort'em out.
WoU
Orc, 6.3k acres
God damnit, better graphics != revolutionary gaming! Get it through your skull!
Bookmarks