Page 1 of 1

2 commands, 1 file.

Posted: Sun May 12, 2002 2:51 pm
by Aaron
I have to inserts...

<? echo "<img src="".$img."">"; ?>

<? readfile($display . '');?>


How would I make it so I could only use 1 at a time in one php file, without the other one doing an error like this;

Warning: readfile("") - Inappropriate ioctl for device in /home/www/unknownz/test.php on line 4

http://www.unknownzone.org/test.php?img ... alight.jpg

Posted: Sun May 12, 2002 4:06 pm
by Aaron
<?php
if ($display) {
readfile($display);
}
else if (!$display && $img) {
echo "<img src="$img" border="0" alt="" />";
}
else { echo "nothing to display"; }
?>


Works fine, thx to none of you, hehe