|
Posted by Confused but working on it on 09/11/07 23:30
On 2007-09-11 16:19:12 -0700, "Ron Barnett" <No@Spam.Thanks> said:
> "Confused but working on it" <PostInGroups@wherever.com> wrote in
> message news:2007091115023216807-PostInGroups@wherevercom...
>> On 2007-09-11 14:50:53 -0700, Michael Fesser <netizen@gmx.de> said:
>>
>>> .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
>>
>> Wow, Thanks!
>> I didn't even think to try adding the images/ part to the line. Figured
>> it was outputting the filename so...
>>
>> Mixing single and double quotes in the case eliminates the need to
>> escape I take it.
>>
>> Now it appears I have files named "." and "..", well, back to the manual...
>>
>> Thanks again
>
> . refers to the current directory, and .. refers to its parent - its an
> Operating System thing.
>
> Cheers
>
> Ron
Teah I scarcely remember taking that Unix class at Deanza College.
Should have saved my notes but most likely not relevant anyway. :)
[Back to original message]
|