This website uses cookies to improve user experience. By using our website you consent to all cookies in accordance with our Cookie Policy.
FAQ

We provide webhosting for thousands of domains.
Transfer your domains to us and join our satisfied customers.

Domains from 5,99€. Renewal for the same price.

Support

FAQ

Others

HOTLINE  
+421 221 028 430
E-MAIL support
support@exohosting.com
ICQ support
213 057 503
ONLINE support

Mo-Fr: 08:00-20:00
Sa-Su: 10:00-18:00

Economy

Mo-Fr: 08:00-16:30

Free transfer of .sk domain

If you transfer your domain to us, we pay transfer fee for you.

How to upload files using PHP?

seen: 1466 | Date added: 05.09.2010 | rating:
"

File upload form :

    Upload:      

File upload script - upload.php :


$uploaddir = 'data/';
$uploadfile = $uploaddir . basename($_FILES['userfile']['name']);


if (move_uploaded_file($_FILES['userfile']['tmp_name'], $uploadfile)) {
echo ""File has been uploaded succesfully.\n"";
} else {
echo ""File could not be uploaded.\n"";
}

?>

The data directory has to be placed in the same directory as the script and it also has to be writeable for group.

"
Was this article helpful?
no
Hodnotenie 2.67/5 (604 hlasov)
yes

Related topics