Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- if(count($_FILES) > 0){
- if(move_uploaded_file($_FILES['picture']['tmp_name'] , 'test'.DIRECTORY_SEPARATOR.$_FILES['picture']['name'])){
- echo "File uploaded successfully";
- }else{
- echo "Error";
- }
- }
- ?>
- <form method = "POST" enctype = "multipart/form-data">
- <input type = "file" name = "picture"/>
- <input type = "submit" value = "Upload image"/>
- </form>
- <?
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement