Saturday, March 10, 2012

Get uploaded file information in PHP

[sourcecode language="php"]
<?php
if(isset($_POST['btn_upload']))
{
echo '<pre>';
print_r($_FILES['file_upload']);
echo '</pre>';
}
?>

[/sourcecode]





[sourcecode language="html"]
<form action="upload.php" method="post" enctype="multipart/form-data">
<input name="file_upload" type="file" />
<input name="btn_upload" type="submit" value="Upload" />
</form>

[/sourcecode]

No comments:

Post a Comment

How to enable CORS in Laravel 5

https://www.youtube.com/watch?v=PozYTvmgcVE 1. Add middleware php artisan make:middleware Cors return $next($request) ->header('Acces...