[SOLVED] Easy question

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
weeshdude
Forum Newbie
Posts: 7
Joined: Fri Nov 26, 2004 7:19 pm

Easy question

Post by weeshdude »

I'm trying to display a picture with this code and it ain't working. I'm not seeing the problem. any help would appeactied. or is there a better way?

Code: Select all

echo "<img src="$file">";
Thanks Aaron
User avatar
scorphus
Forum Regular
Posts: 589
Joined: Fri May 09, 2003 11:53 pm
Location: Belo Horizonte, Brazil
Contact:

Post by scorphus »

If $file holds the full path to the file (i.e. logo.jpg or ../images/logo.jpg) it should work. What is the content of $file? Give us what the following outputs:

Code: Select all

<pre><?php
print_r($file);
?></pre>
-- Scorphus
weeshdude
Forum Newbie
Posts: 7
Joined: Fri Nov 26, 2004 7:19 pm

Problem Solved thanks for the help!

Post by weeshdude »

Thanks alot it works

aaron
Post Reply