This question already has an answer here:
I want to get user selected file size or type...
what is the php codes for it?
<?php
if(isset($_POST['add_file'])){
(what codes?)
}
?>
<form method="post" enctype="multipart/form-data">
<input name="file" type="file">
<input type="submit" name="add_file" value="Choose your file!">
</form>
</div>
I found my answer in this form:
<form method="post" enctype="multipart/form-data">
<input name="file" type="file">
<input type="submit" name="add_file" value="Choose your file!">
</form>
<br/>
<div>
<?php
if(isset($_POST['add_file'])){
echo 'Size(bit):'.$_FILES["file"]["size"].'<br/>Type:'.$_FILES["file"]["type"];
}
?>
</div>
I can't access to file directory of user... cause this is a form of attacking.