Code Comments
Programming Forum and web based access to our favorite programming groups.Hi all,
I've got a field in a database that indicates where an include file is.
Because I can't open the file named in the db, Icreated another variable
with the exact same contents.
$strBody = $row['BODY'];
$strText = "body.php";
// EACH OF THESE PUTS OUT THE EXACT SAME OUTPUT
echo "strText = $strText <p>";
echo "strBodyText = $strBodyText <p>";
// WORKS EVERY TIME BUT IS ONLY THE TEST FILE
$fp = fopen($strText,"r");
if ($fp)
{ print"The file exists!<p>"; }
else
{ print"The file does not exist<p>"; }
}
// THIS NEVER WORKS :-(
$fp = fopen($strBody ,"r");
if ($fp)
{ print"The file exists!<p>"; }
else
{ print"The file does not exist<p>"; }
}
What am I doing wrong? Help please!
Patrick
Post Follow-up to this message
Show a Printable Version
Email This Page to Someone!
Receive updates to this thread
Powered by vBulletin
Copyright 2000-2006 Jelsoft Enterprises Limited.