Hello,
I upload a movie file to server[Linux server].
After upload I would like to check, the upload file is properly uploaded or not. How to check it?
I need code for upload error handling and file size of my uploaded file from the server.
I need code help.Thanks so much.
Thanks in advance,
Thendral
Get File Size from Server directory after upload.
Moderator: General Moderators
Re: Get File Size from Server directory after upload.
In the $_FILES array is the size of the uploaded file. If you don't believe HTTP and PHP are doing their job, print that number out and compare it with your local file's size.
Re: Get File Size from Server directory after upload.
Hi tasairis,
Sorry I can't able to understand.
I found some code,
I'm using move_uploaded_file for move file, so using conditional statement am checking. If it returns false, show message "Upload fails". See the code below,
if(move_uploaded_file($_FILES['adFile']['tmp_name'],"upload/" .
$_FILES["adFile"]["name"]))
{
echo "Stored in: " . "upload/" . $_FILES["adFile"]["name"];
} else {
echo "Error, couldn't save uploaded file.";
}
Can I use this way or could you give me some code sample.
Thanks,
Thendral
Sorry I can't able to understand.
I found some code,
I'm using move_uploaded_file for move file, so using conditional statement am checking. If it returns false, show message "Upload fails". See the code below,
if(move_uploaded_file($_FILES['adFile']['tmp_name'],"upload/" .
$_FILES["adFile"]["name"]))
{
echo "Stored in: " . "upload/" . $_FILES["adFile"]["name"];
} else {
echo "Error, couldn't save uploaded file.";
}
Can I use this way or could you give me some code sample.
Thanks,
Thendral
Re: Get File Size from Server directory after upload.
Your first step is to find that number.tasairis wrote:In the $_FILES array is the size of the uploaded file.
Your second step is to do whatever you want with that number.
Re: Get File Size from Server directory after upload.
hi tasairis ,
Thank you, I fix it.
Thanks Again,
Thendral
Thank you, I fix it.
Thanks Again,
Thendral