PHP form data (multipart/form-data) is not working

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
arutura
Forum Newbie
Posts: 2
Joined: Wed Aug 13, 2008 2:01 am

PHP form data (multipart/form-data) is not working

Post by arutura »

Dear all,
I need a help. Am submitting a file data through form submission. In Server with php am reading the form data (file name and tmp path). Then am rename() the file to a folder. and chmod of the moved file. Strangely after doing all these in code. if i go to that folder and check that file is missing.

Please help me where it is going wrong.

thanks in advance.

regards
Arutura team
User avatar
The_Anomaly
Forum Contributor
Posts: 196
Joined: Fri Aug 08, 2008 4:56 pm
Location: Tirana, Albania

Re: PHP form data (multipart/form-data) is not working

Post by The_Anomaly »

arutura wrote:Dear all,
I need a help. Am submitting a file data through form submission. In Server with php am reading the form data (file name and tmp path). Then am rename() the file to a folder. and chmod of the moved file. Strangely after doing all these in code. if i go to that folder and check that file is missing.

Please help me where it is going wrong.

thanks in advance.

regards
Arutura team
You really might want to consider posting your code. It's more likely you'll get "a help," that way :D

I'm just messing with you. But really, every time I've had trouble with a form upload, the issue has been in my PHP code. By posting it, the devs here can identify the problem. However, check out this manual page though. Has been of great help to me in the past.
DaiWelsh
Forum Commoner
Posts: 36
Joined: Wed Jan 08, 2003 9:39 am
Location: Derbyshire, UK

Re: PHP form data (multipart/form-data) is not working

Post by DaiWelsh »

Firstly +1 for posting the code.

Are you checking for errors every step of the way? It may be that either the move or chmod are failing silently. Also could be a permissions issue but without code can only guess.

I would also recommend using move_uploaded_file() to get the file to it's destination, but this may not solve your problem directly, just an aside really.
Post Reply