|
||||||
| PHP Tutorials PHP Tutorials |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
|
|||||
|
You could try putting the following... Code:
header('Content-type: image/jpg');
Code:
echo $content; Last edited by Jaan; 10-13-2008 at 01:36 PM.. Reason: Please use code tags when you're posting your codes! |
|
|||
|
Hi , Jaan Can you help a newbie ? I can upload images into the database with no problems, but retrieving them is a problem, they come out of the database in a raw form, its as if the following code is not working ! header('Content-type:image/jpg'); it does not seem to have an effect, if I delete this part of the code I get the same result! Raw data. Can you help? Last edited by billjones; 10-13-2008 at 01:10 PM.. |
|
|||||
|
Umm.. do you use the same script or you have changed it..? If you have changed it, please post it here so I can check what's the problem
__________________
![]() CodeCall Blog | CodeCall Wiki | Shareware | Linux Forum | Freelance Cheap & Professional Web Design | Need help? Send a PM |
|
|||
|
Hi Jann, Thanks for the quick reply, here is my code. PHP Code:
php code for print_pic.php PHP Code:
Thanks Bill. Last edited by Jordan; 11-09-2008 at 08:18 PM.. Reason: added tags |
|
|||||
|
please use the php tags. this is a special php file when you output the picture, it may not contain any html as it's a picture you're returning, not a web page. remove everything before <?php and after ?> and it will work. make extremely sure that there are absolutely no letters, spaces or any other symbols before the <?php otherwise, the system might believe it's a web page and goes nuts. |
|
|||
|
hello thanks for the code its works fine for me but i have a problem..though the script work fine when i open my page in flock or mozilla or any toher browser but it dont work when i open the page in internet explorer..it try to download the php file....can you kindly solve my this problem.... i am trying to open the file with this url localhost/test/displayimage.php=?1 IT works fine with in flock and mozilla |
|
|||||
|
your link must be.. displayimage.php?id=1
__________________
![]() CodeCall Blog | CodeCall Wiki | Shareware | Linux Forum | Freelance Cheap & Professional Web Design | Need help? Send a PM |
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | Search this Thread |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Tutorial: Storing Images in MySQL with PHP | Jordan | PHP Tutorials | 23 | 06-02-2009 10:01 PM |
| Tutorial: PHP to MySQL | Jordan | PHP Tutorials | 9 | 09-05-2008 12:12 PM |
Algorithms and Data Structures
Programming Language Popularity
Code Collaboration
Podnet IRC Network
AmpHosted
Goal #1: 1,000 Blogs
Goal #2: 1,000 Wiki Pages
Goal #3: 300,000 Posts
Goal #4: 20,000 Threads
Done: 30%, 23%, 55%, 75%