This is a discussion on "Image not uploading" within the PHP Forum section. This forum, and the thread "Image not uploading are both part of the Program Your Website category.
|
|
|
|
|
![]() |
||
Image not uploading
|
||
| Notices |
![]() |
|
|
LinkBack | Thread Tools |
|
#1
|
|||
|
|||
|
Image not uploading
Can anyone spot anything here that might be causing the problem, it creates a new subdirectory, gives it the name and sets permissions to 777 so I know that parts ok. I think it must be something here. Im uploading 4 images at the same time so I have it in a loop. Its getting the correct names as ive tried printing $_FILES["$filename"]['name'] and it gives the original name of the file im trying to upload. The path is also correct but i get 'Could not upload', is there something ive missed?
|
|
|
|
#2
|
|||
|
|||
|
Re: Image not uploading
Hi djme,
I assume your uploading via a form??? do you have enctype="multipart/form-data" in your form tag??? eg... <form enctype="multipart/form-data" action="admin_add_product.php" method="post"> I resolved a similar issue by adding enctype. The only other thing I could think of is that you don't have permissions set to upload files in your php.ini file, or you have a limit on the file size, it's usually 2Mb... ; Whether to allow HTTP file uploads. file_uploads = On Hope this helps. Jim. |
|
#3
|
|||
|
|||
|
Re: Image not uploading
Hi, thanks but ive sorted it now. I can't remember what I did but I think id got the path wrong.
Don't suppose you know how to delete directories? I have subdirectories which I want to delete (they contain pictures). The pictures are set to 644 but the directroies are 777 so I thought I could just delete the entire directory using unlink($delete_path); But when i try it, it says warning $delete_path is a directory and doesn't do it. I can delete individual images using it though. Does this just work for files and not directories or do I need to have the images also set to 777 (I didn't think I would because it deletes the images set at 644 since they are in the directory set at 777) Thanks |
![]() |
| Tags |
| image, uploading |
| Thread Tools | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Uploading various image files | Paula | ASP.NET Forum | 1 | Oct 7th, 2006 20:39 |
| uploading a .mov | ppgpilot | PHP Forum | 2 | Jul 26th, 2006 07:01 |
| image uploading HELP | Gavy | Graphics and 3D | 5 | Jun 24th, 2006 10:23 |
| Uploading | ClaireB | Hosting & Domains | 10 | Sep 8th, 2005 12:06 |
| uploading | benbacardi | Classic ASP | 4 | Nov 4th, 2004 17:11 |