Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > PHP/MySQL > Beginning PHP
Password Reminder
Register
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
Beginning PHP Beginning-level PHP discussions. More advanced coders should post to the Pro PHP forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Beginning PHP section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old August 21st, 2007, 12:23 AM
Registered User
 
Join Date: Aug 2007
Location: , , .
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default imagecreatefromjpeg() not working for me.

Please reference page 599 of Beginning PHP 5. I'm having a problem
getting this code snippet to work. The server that I'm working from is Linux..PHP 4.4.7. I have read about the need for the GD libraries and I'm not sure if they are loaded on my host providers system.

Here is the snippet:

<?php
$myImage = imagecreatefromjpeg('moegie.jpg');
header("Content=type: image/jpeg");
imagejpeg($myImage);
imagedestroy($myImage);
?>

I made sure that I substituted filename with one that exists in the same directory as my php code. Instead of displaying the jpeg in my browser (IE 7), I am getting a request to download a file and view it. When I accept the download option, I do NOT see the jpeg in my browser. I'm sure I'm doing something wrong..any help for this novice yet eager student would be appreciated.

Dave

Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
window.opener working .... not working alyeng2000 Javascript How-To 5 January 5th, 2007 08:05 AM
Web.Config..Working or Not Working peace95 ASP.NET 1.0 and 1.1 Basics 1 September 18th, 2006 06:53 AM
Local COM working , but not working at Web Serv nagen111 .NET Web Services 3 February 19th, 2005 04:22 AM
Example not working CKucler BOOK: Beginning PHP4/PHP 5 ISBN: 978-0-7645-4364-7; v5 ISBN: 978-0-7645-5783-5 3 December 8th, 2004 11:26 AM
Get Working Copy... not working Enkiel Classic ASP Basics 0 April 21st, 2004 01:41 PM



All times are GMT -4. The time now is 04:12 PM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.