|
Posted by Michael Fesser on 09/11/07 21:50
..oO(Good Man)
>Confused but working on it <PostInGroups@wherever.com> wrote in
>news:2007091114413816807-PostInGroups@wherevercom:
>
>> <?php
>> //NOT WORKING - shows the little blue question mark box
>> echo "<img src = \"/DSC01351.jpg\">";
>
>This means: show an image, the source of which is at the top of the
>server. Perhaps you should put the entire path to the image, relative
>to where your PHP script is being called from.
>
>echo "<img src=\"path/to/my/image/DSC01351.jpg\">";
Additionally HTML also allows single quotes, which avoids the ugly
escaping:
echo "<img src='path/to/my/image/DSC01351.jpg'>";
>according to your script, the images are located in the directory
>"images". therefore, you need the directory name in addition to the
>image name. should be:
>
>echo "<img src=\"images/".$file."\" alt=\"my image\">";
echo "<img src='images/$file' alt='my image'>";
I find that much more readable.
Micha
Navigation:
[Reply to this message]
|