Wrox Programmer Forums
| Search | Today's Posts | Mark Forums Read
BOOK: Beginning PHP5, Apache, and MySQL Web Development ISBN: 978-0-7645-7966-0
This is the forum to discuss the Wrox book Beginning PHP5, Apache, and MySQL Web Development by Elizabeth Naramore, Jason Gerner, Yann Le Scouarnec, Jeremy Stolz, Michael K. Glass; ISBN: 9780764579660
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning PHP5, Apache, and MySQL Web Development ISBN: 978-0-7645-7966-0 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
  #1 (permalink)  
Old June 9th, 2008, 08:26 AM
Registered User
 
Join Date: Jun 2008
Location: , , .
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default Upload_image.htm Chapter 7

Hello,

(chapter 7 page 196)
When i want to upload a .jpg upload_image.htm
image: test
username:test
upload image: 20.jpg
it doesn't show in
check_image.php and not in showimage.php

my php code was copied from website:
$image_filename = "images/" . $image_id . ".jpg";

i created /images when i upload ftp 20.jpg to /images
it also does not work in showimage.php
when i change
$image_filename = "images/" . $image_id . "20.jpg";
It shows the .jpg in showimage.php

Anyone can help me what is going wrong?

Thanks
Greetz,
Jeroen
  #2 (permalink)  
Old June 11th, 2008, 05:49 AM
Registered User
 
Join Date: Jun 2008
Location: , , .
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I can only think of the wrong image dir?
I'm working on a live server php5 and tried several things.
I created image with create_images_table.php
so in myphpadmin there is image and made a ftp dir images

check_image.php
//upload image and check for image type
$ImageDir ="localhost/httpdocs/jeroen/images/";
tried
$ImageDir ="http://www.hostname.com/httpdocs/jeroen/images/";
tried
$ImageDir ="~/images/";
ect

anyone can tell me what the correct $ImageDir is?
  #3 (permalink)  
Old September 3rd, 2009, 11:53 AM
Registered User
 
Join Date: Sep 2009
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Quote:
Originally Posted by jeroen View Post
I can only think of the wrong image dir?
I'm working on a live server php5 and tried several things.
I created image with create_images_table.php
so in myphpadmin there is image and made a ftp dir images

check_image.php
//upload image and check for image type
$ImageDir ="localhost/httpdocs/jeroen/images/";
tried
$ImageDir ="http://www.hostname.com/httpdocs/jeroen/images/";
tried
$ImageDir ="~/images/";
ect

anyone can tell me what the correct $ImageDir is?
Try to make it relevent to the php file.
i.e. if the php file is saved in "localhost/httpdocs/jeroen", then just use:
$ImageDir ="images/";


Similar Threads
Thread Thread Starter Forum Replies Last Post
"../Chapter 6/XSLT/IE/Figure3.htm" - missing image mark4asp BOOK: Professional Ajax 2nd Edition ISBN: 978-0-470-10949-6 0 October 31st, 2007 08:12 AM
book.htm problem in chapter 04 50000 BOOK: Professional Ajax ISBN: 978-0-471-77778-6 5 May 16th, 2006 06:22 PM
how to use recordType in htm/asp gilgalbiblewheel Classic ASP Databases 11 August 15th, 2004 12:06 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.