zjh7
New Member
Posts: 15
|
Post by zjh7 on Oct 14, 2012 10:09:01 GMT -5
Hey guys I'm trying to get my File Upload to work. It seems as though on the Paradox server, I cannot get my file permissions to go higher than 755, so "others" cannot write and I think this is why my file upload is not working. Here is my code just to make sure that's the issue:
$origName = $_FILES['userfile']['name']; $origSize = $_FILES['userfile']['size']; $origType = $_FILES['userfile']['type']; echo "File Name: $origName<br />File Size: $origSize<br />File Type: $origType"; move_uploaded_file($_FILES['userfile']['tmp_name'], "uploads/$origName");
I'm pretty sure that was the correct way of doing it.
|
|
zjh7
New Member
Posts: 15
|
Post by zjh7 on Oct 14, 2012 11:06:37 GMT -5
Just kidding. There seems to be an error with my code processing the actual transfer, but I see some people have uploaded things into my "Uploads"
|
|
|
Post by clytze on Oct 14, 2012 12:56:08 GMT -5
hey, try this
change
move_uploaded_file($_FILES['userfile']['tmp_name'], "uploads/$origName");
to
move_uploaded_file($_FILES['userfile']['tmp_name'], "uploads/".basename($origName));
|
|
zjh7
New Member
Posts: 15
|
Post by zjh7 on Oct 15, 2012 9:57:05 GMT -5
Hmm, I tried that but it still did not seem to work. I got the actual process of file uploading to work on the paradox server, but my program always says it does not go through. I think this may be a timing error, as it seems to scan for the file before its actually transferred to the server, and the file shows up afterwards in the directory.
|
|
|
Post by yifeng on Oct 15, 2012 16:03:42 GMT -5
Same. I could not upload successfully on my local server. But it works on paradox server.
|
|
|
Post by Erickcreer on Aug 22, 2020 21:07:04 GMT -5
|
|
|
Post by Erickcreer on Aug 26, 2020 22:50:59 GMT -5
|
|