LinksTraffic - Links and traffic exchange system

Uploading a File

english directory french directory
Search: Advanced Search

Index Webmaster | Tutorials | Web Scripts

Uploading a File

This code is commonly used when there is a need of uploading small and medium files onto a server.
It will be done in 2 steps.
  • Create an HTML form to pick up the name;
  • Upload the file and move it to the right directory

You should follow these steps in order to get your script working:

  1. Fill in details about the path for the file (input the path of the file inside the $pathfile variable;
  2. Make sure you have the privileges to move and write a file into the directory (use of chmod function).

The different Files

- The upload.html file:

It contains the html form.
Simply copy this to a file and name it upload.html.

- The uploadfile.php file:

This file is used to handle the file on the server side.

Now you should have uploaded the 2 files onto your server inside the same directory.
Run it and use the code wherever you wish.

Note: for larger files, you may use the FTP protocol or develop some applets (Java, ActiveX...).

Comments

No comment yet, write the first now here or onto our webmaster forum

Categories

Copyright 2004-2010 @ LinksTraffic RHM Solution ::: Partners | Privacy | Contact us form