FRIHOST FORUMS SEARCH FAQ TOS BLOGS COMPETITIONS
You are invited to Log in or Register a free Frihost Account!


Weird Image Problem...





Star Wars Fanatic
Ok, so, I generate an image using php in a script, it then displays a web page containing the now generated and saved image using an image tag:

Code:
<img src=sigs/BasicBlue-RST%20Admin-Titan%20Eric.gif" align="absmiddle" />


That's how it appears on the final web page.
Now, the image refuses to show, I couldn't figure out why, because the script generates a perfectly viewable image, that you can see anywhere else.
I then right-clicked on the image, and copied the link, that's where I found the problem.
For some reason, even though the img tag is the code above, the image link shows up as:

Code:
BasicBlue-RST%20Admin-Titan%20Eric.gif%22


And that added "%22" at the end makes the image un-viewable. And I have no clue why... Maybe you all could shed some light on it Smile
brokenadvice
Quote:
<img src=sigs/BasicBlue-RST%20Admin-Titan%20Eric.gif" align="absmiddle" />


You're missing the first quotes before sigs. You also should escape your quotes with a backslash. Your new code should look more like:

Code:
<img src=\"sigs/BasicBlue-RST%20Admin-Titan%20Eric.gif\" align=\"absmiddle\" />
Star Wars Fanatic
Whoops, that was it, thanks for you help Smile

And for the echo I was using ' instead of " tags, I just forgot the leading quote tags.

Can't believe I missed it, though Embarassed

Thanks!
Related topics
[tutor] How to protect images without htaccess using PHP
Help with Website
Imageadvisor to the Hamas
Center IFrame
Weird FTP problem.
The new, and improved, OS Advocacy.
Weird phpbb problem
iFrame / Frame Weird Border Problem
Expanding forums?
Disappearing Images?
Weird file problem :(
Weird IMG problem?
Another weird jQuery problem.
Joomla 3.0 article image problem.. MAGIC QOUTES
Reply to topic    Frihost Forum Index -> Scripting -> Php and MySQL

FRIHOST HOME | FAQ | TOS | ABOUT US | CONTACT US | SITE MAP
© 2005-2011 Frihost, forums powered by phpBB.