andy's php projects
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
Script and site usage:
All of the scripts on this site are provided free for non-commerical, personal or non-profit use. If you find these scripts useful to you, appreciate the free support, or are just an all round nice person, then why not donate a little dosh? If you wish to use any of these in a commercial system, please refer to the payment plan.


Image is displayed as garbage text??

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    php.amnuts.com Forum Index -> Crop Canvas
View previous topic :: View next topic  
Author Message
Wozzza
Newbie


Joined: 30 Jan 2005
Posts: 4

PostPosted: Sun Jan 30, 2005 9:56 pm    Post subject: Image is displayed as garbage text?? Reply with quote

i insert the code as showed in examples into my page, i even put the jpeg header up the top of the page on the first line and no errors are generated but when the script gets called it seems to work fine but theimage is displayed as garbbage text all down the screen instead of an image. whats going on here?? it works ok on its own not in a web page butput it in a web page it displays text, not image.
using IE6 on windows 2000.
any ideas???
Back to top
View user's profile Send private message
amnuts
Site Admin


Joined: 01 Sep 2002
Posts: 662
Location: East Sussex, England

PostPosted: Mon Jan 31, 2005 3:41 am    Post subject: Reply with quote

Hi Wozzza, and welcome to the board.

In situations like this it's because of whitespace almost 100% of the time. Check out these threads to see if your problem is the same:

http://php.amnuts.com/forums/viewtopic.php?t=92
http://php.amnuts.com/forums/viewtopic.php?t=192

Don't forget to check the class files and your script file.

Andy
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger MSN Messenger
Wozzza
Newbie


Joined: 30 Jan 2005
Posts: 4

PostPosted: Mon Jan 31, 2005 9:37 pm    Post subject: Reply with quote

Quote:
The showImage function will output an HTTP header, and that requires NOTHING to have been sent to the browser before hand, otherwise headers will already been sent and cannot be altered.


thats no good then as i call the showimage several places all down the page, i have to use another method, got any ideas??
Back to top
View user's profile Send private message
amnuts
Site Admin


Joined: 01 Sep 2002
Posts: 662
Location: East Sussex, England

PostPosted: Tue Feb 01, 2005 3:38 am    Post subject: Reply with quote

For displaying images once you've already sent headers to the browser telling it the content is text there are two options. Here's a link telling you about them, and even though it's on the dropshadow class board, it still relates to the crop canvas class.

http://php.amnuts.com/forums/viewtopic.php?t=153

It's the second post down. If it doesn't make sense, post up and I'll try to explain more.

Andy
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger MSN Messenger
Wozzza
Newbie


Joined: 30 Jan 2005
Posts: 4

PostPosted: Thu Feb 03, 2005 2:08 am    Post subject: Reply with quote

i actually had point number 2 of that post in mind but i was too lazy to try it but seeing that you suggested it i will give it ago abit later on today or tomorrow and let you know.
Back to top
View user's profile Send private message
Wozzza
Newbie


Joined: 30 Jan 2005
Posts: 4

PostPosted: Fri Feb 04, 2005 8:51 pm    Post subject: Reply with quote

it worked perfectly
Back to top
View user's profile Send private message
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    php.amnuts.com Forum Index -> Crop Canvas All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group