Skip to content

Uploading files with PHP

Upload an image or file to your server without using your FTP.
Step 1: Open a web editor, then paste this
<form action=”upload.php” method=”post” ENCTYPE=”multipart/form-data”>
File: <input type=”file” name=”file” size=”30″> <input type=”submit” value=”Upload!”>
Then save it as form.php
Step 2: Open a web editor once again, and paste this code:
$uploaddir = “uploads”; // Where you want the files to upload to
print “Your file has been uploaded successfully!”;
Save it as upload.php
Step 3: Upload these to files onto your website using any ftp program.
Step 4: Upload a folder called uploads and CHMOD it to 0777