$image = imageCreateFromGIF("http://" . $_SERVER['HTTP_HOST'] . $_SERVER['PHP_SELF'] . '?clrimg');
how can i make that point to the file within the site.
not http
$image = imageCreateFromGIF("http://" . $_SERVER['HTTP_HOST'] . $_SERVER['PHP_SELF'] . '?clrimg');
how can i make that point to the file within the site.
not http
My Web Site
Japan Town
Save it as a php file, then use an img tag:
Code:<img src="phpimage.php">
- Mike
You can't, the "file" isn't an image, it's the output of a script. The image data is embedded (base64-encoded) in the PHP file, if I remember correctly.
Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!
You can, if it has a Content-Type header of Image.
PHP Code:header("Content-Type: image/gif");
Peter - alotofstuffhere[dot]com - Email Me - Donate via PayPal - Got spare hardware? Donate 'em to me :) Just send me a PM.
Currently: enjoying the early holidays :)Read before posting: FAQ | What you CAN'T do with JavaScript | Form Rules | Thread Title Naming Guide
No, since unless it's accessed via HTTP, the script won't be executed, and the function will be trying to parse the script text as a GIF image.
Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!
The script returns a GIF file if you do it correctly.
- Mike
Then run it through HTTP. Do it some roundabout way if needed...
Daniel - Freelance Web Design | <?php?> | <html>| español | Deutsch | italiano | português | català | un peu de français | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum
That's what's already happening, from the look of it.
Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!
Ah, missed that.
Well, problem simplified to no point in trying to 'fix' it as the solution seems present already.
What's wrong with using http anyway?
Daniel - Freelance Web Design | <?php?> | <html>| español | Deutsch | italiano | português | català | un peu de français | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum
Bookmarks