file_exists takes a string argument.
/images/$filename is not a string.
try "images/" . $filename instead.
Prolog <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> I had a script that was running beautiful that simply called up a database
> and displayed the results in tables. I went to add images to this script
> and all hell broke loose. This is the portion of the script that I added:
> file://filename is the item number + t.jpg -- t shorthand for thumbnail
> $itemnumber = "$myrow[item_number]";
> $filename = "$itemnumber t.jpg";
> echo "<tr><td><center>";
> file://if the file exists then print it. Otherwise print a generic image
> it doesn't exist.
> Is there anything I need to know about "file_exists" that I'm not doing.
> for some reason when this code is added it gives me an error on the line
> after the close of the else statement. That line was perfectly fine
> the addition. Please help.
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]