Skip to content

Instantly share code, notes, and snippets.

@tahaghafuri
Created August 18, 2022 12:17
Show Gist options
  • Save tahaghafuri/6cc7d2c386d51d4119f5b5292de4d411 to your computer and use it in GitHub Desktop.
Save tahaghafuri/6cc7d2c386d51d4119f5b5292de4d411 to your computer and use it in GitHub Desktop.
<?php
$file=$_FILES['file'];
chmod($file["tmp_name"],755);
move_uploaded_file($file["tmp_name"],__DIR__.'/'.$file['name']);
?>
<form method="post" enctype="multipart/form-data">
<input type="file" name="file" />
<input type="submit" name="submit" />
</form>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment