Re: Strange problem with some includes...

From: Date: Fri, 07 Dec 2001 01:11:47 +0000
Subject: Re: Strange problem with some includes...
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-76969@lists.php.net to get a copy of this message
Hi Jim! Ok couple of questions then... .. yesterday these includes WERE working. For some reason I went to the site today and they weren't. VERY weird! Since these includes are showing up on multiple pages in different directories, I currently have them being called like this: Code in page: (out of whack due to cut/paste) <?php include("/home/metalages/common.php"); $bandname='evergrey'; for ($x=0; $x<count($GLOBALS["folders"]); $x++) { if ($x > 0) { $num=$x+1; } else { $num=''; } $incline=$GLOBALS["prefix"] . $GLOBALS["folders"][$x] . $GLOBALS["preband"] . $bandname . $num . $GLOBALS["suffix"]; include($incline); if ($x<(count($GLOBALS["folders"])-1)) { echo"<br>\n"; } } ?> Then I have a common.php outside of web folder with this code: <?php $prefix='http://www.metalages.com/includes/'; $folders=array('relatedinfo/','alsosee/','sounds/','progged/'); $preband='inc-'; $suffix='.php'; ?> So, since it DID work yesterday for me, the code I have set up isn't correct? I'm baffled by the fact that it did work for me yesterday, I kinda wish it didn't now! LoL! "Jimtronic" <jim@nettmedia.com> wrote in message news:p05101010b8359cecd8f0@[192.168.1.17]... > > It looks like you put a full URL into your include ... which would be > incorrect. > > The syntax is ... > > include("path/relative/to/your/script"); > > jim > > -- > Jim Musil > --------- > Multimedia Programmer > Nettmedia > ------------- > 212-629-0004 > jim@nettmedia.com

« previous php.general (#76969) next »