[advanced search]
 

Go Back   NamePros.com > Discussion > Web Design & Development > Programming

Programming PHP, Perl, Ruby on Rails, AJAX, HTML, XHTML, CSS, JavaScript, MySQL and any other coding topics.


Closed Thread
 
LinkBack Thread Tools
Old 11-17-2004, 01:34 AM   #1 (permalink)
NamePros Expert
 
redhippo's Avatar
 
Join Date: Oct 2003
Location: ANForum
Posts: 5,244
3,630.35 NP$ (Donate)

redhippo is a splendid one to beholdredhippo is a splendid one to beholdredhippo is a splendid one to beholdredhippo is a splendid one to beholdredhippo is a splendid one to beholdredhippo is a splendid one to beholdredhippo is a splendid one to beholdredhippo is a splendid one to behold


Sad image upload failure

whats the problem?? can anyone tell me??

Warning: move_uploaded_file(/home/kaxking/public_html/userimages/): failed to open stream: Is a directory in /home/kadking/public_html/admin/graphics_images.php on line 42

Warning: move_uploaded_file(): Unable to move '/tmp/phpP18fzK' to '/home/kaxking/public_html/userimages/' in /home/kaxking/public_html/admin/graphics_images.php on line 42
Discover_miles.bmp did not upload!
__________________
|www.vb-skins.com|- Quality Premade Vbulletin skins for Your VB forum makeover |www.Banjir.com|-Free image hosting?[B]For Sale!|AlphaScripts|Money Generating Scripts
FREE VB Skins
redhippo is offline  
Old 11-17-2004, 05:47 AM   #2 (permalink)
Senior Member
 
Join Date: May 2003
Posts: 2,211
6,170.25 NP$ (Donate)

adam_uk is a jewel in the roughadam_uk is a jewel in the roughadam_uk is a jewel in the rough

Breast Cancer
looking at those errors the files are not uploading because your not specifiying the file to to upload to, your trying to turn a folder into a file

say youve got the file color.gif
and you want to upload to /home/account/www/images

when you upload the file the contents of the file gets uploaded into a php tmp file to wherever and then you have to copy/move the uploaded file to a new folder and file name

so you need to make a not of the filename in your script and then on your function you need to add the file name so say color.gif was in a vairable called $file

you need to add onto the end of the path $file
so for example
/home/account/www/images/$file

then it should copy the file into color.gif

php doesnt actually copy the file it copys the contents of the file

well thats how i understand it
adam_uk is offline  
Old 11-18-2004, 01:29 AM   #3 (permalink)
NamePros Expert
 
redhippo's Avatar
 
Join Date: Oct 2003
Location: ANForum
Posts: 5,244
3,630.35 NP$ (Donate)

redhippo is a splendid one to beholdredhippo is a splendid one to beholdredhippo is a splendid one to beholdredhippo is a splendid one to beholdredhippo is a splendid one to beholdredhippo is a splendid one to beholdredhippo is a splendid one to beholdredhippo is a splendid one to behold


Sad

i sort of understand most of it accept this.
Quote:
Originally Posted by adam_uk
then it should copy the file into color.gif
actually what I did was to use the browse and upload function within the admin panel to do the loading.
and it gives the error message!
no idea of PHP!
__________________
|www.vb-skins.com|- Quality Premade Vbulletin skins for Your VB forum makeover |www.Banjir.com|-Free image hosting?[B]For Sale!|AlphaScripts|Money Generating Scripts
FREE VB Skins
redhippo is offline  
Old 11-18-2004, 02:49 AM   #4 (permalink)
Senior Member
 
Join Date: May 2003
Posts: 2,211
6,170.25 NP$ (Donate)

adam_uk is a jewel in the roughadam_uk is a jewel in the roughadam_uk is a jewel in the rough

Breast Cancer
basically when you upload a file it makes a note of the size file name and tmp name that its given, the script will then read the contents of the file (it doesnt actually copy the file) and then when its uploaded it places the contents into a tmp file when its uploaded the script will then make and empty file called the file name you uploaded it then writes the contents of the tmp file to the new empty file. so the empty file gets the contents of the file you just uploaded so it appears as an exact copy

so with that script your not actually specifiying the file you want to write to its set as a directory.
adam_uk is offline  
Closed Thread


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Site Sponsors
Advertise your business at NamePros

All times are GMT -7. The time now is 04:53 PM.


Powered by: vBulletin® Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0
Template-Modifications by TMS
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85