Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Image Generation linking

Status
Not open for further replies.

Dweezel

Technical User
Joined
Feb 12, 2004
Messages
428
Location
GB
I've created a small image generated with php on my server. In the tutorial I'm working on it says that to display it in a html page use a simple image tag format:

<img src="image.php" height="200" width="200" alt="Sales Are Low!!">

When the image script is called on directly( it displays well in the browser, but when I try the above method in a html page it won't load.
Are there any configuration settings with php that relate to this?
 
are you accessing this page through the IIS or locally (e.g. by double clicking it in windows explorer?). if the second one is the case, it's because image.php does not get parsed by the php preprocessor. try accessing your page like
 
Thanks for your replies, but unfortunatley I've tried these things out already. I've tried testing it locally and on a remote server. I've also tried using absolute and relative paths (even though they are in the same directory) without luck.
Any other ideas?
 
try putting a real gif or jpg in your directory and calling that. This will show if images are being handled ok at the basic level. Your code looks like it should work and I've dome such a thing loads of times.
Do you get a broken image box or nothing at all, can you alos post the code for image.php or it its hugh just the headers please.
 
Dumbass in the room!

I'd like to tell you that the problem was a technical one on my remote server, and that after much consultation with the host it is now resolved.

The reality, however, dawned on me this morning while staring forlornly at my non-working image loading page. I had coded my title like this:

<title>Image Loader/title>

Yep, I missed a "<" symbol. Thank god I don't work for NASA :-)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top