Calling Files from a different directory

From: Date: Thu, 03 Oct 2002 17:53:24 +0000
Subject: Calling Files from a different directory
Groups: php.general 
Request: Send a blank email to php-general+get-118774@lists.php.net to get a copy of this message
I have a page set up that loads the contents of a text file into an HTML template using PHP. (i.e. something.com/page.php?include=1 where "1" is a simple no-extension text file in the same directoy as page.php). Is there a way to modify the PHP code in the template page to search for the included page in another directory? Right now, the only way to do it is to have the URL as "page.php?include=files/1". Currently, here is the code I use to takes the $include URL variable and makes the file accessible in the template: $info = file($include); -- Kyrie Eleison, Rick www.spiritsword.com/phpBB2/ --- Outgoing mail is certified Virus Free because I care. Jesus Saves! Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.391 / Virus Database: 222 - Release Date: 9/19/02

« previous php.general (#118774) next »