To raise a file the servant by means of the PHP

Details of the Article
URL: http://www.web-site-hosting-oregon.com/support/index.php?_m=knowledgebase&_a=viewarticle&kbarticleid=18
YOU GO of the Article: 18
Created in: 11 Nov 2006 01:45 p.m.

Answer

Due to the demand that there is on the part of our clients, to be able to raise a file the servant by means of the PHP, without needing using the FTP client. this script therefore does, we must mention that there is to create a folder WAR within public_html because will be there where they rise the file. If it really wants that it is another folder where subán the files, will have to change in the line of programming (“tmp/$File_name”) name WAR by the folder name that you want.

<html>
<head>
to <title>Suir a file to servidor</title>
</head>
<body>

<?

if ($File) {


print (“Name of the file: $File_name<p> \ n”);

print (“So large of the file: $File_size<p> \ n”);

if (Copy ($File, “tmp/$File_name”)){

print (“the file to raised the servant <p> \ n”);

} else {

print (“the file has not been raised the servant <p> \ n”);


}

unlink ($File);

}

print (“to raise the servant a file”);

print (“<form action= \ “subir.php \” method=post enctype= \ “multipart/form-dates \ “> \ n”);


print (“File <input type=file name= \ “Cases out \” size=20><br> \ n ");

print (“<input type=submit name=submit value= \ “submit \” > </form> \ n ");

>

</body>
</html>

We hope that it is of his affability

Note: The file .htaccess is necessary to put the Globals to register on, to see down:

php_flag register_globals on



www.famous-car.co.uk , cours d anglais en ligne , krakow tours , motor.world-auto.co.uk , Dubai Sports City Villas , Dickens Circus , Al Nahda Studio , real estate bulgaria , moto.nice-car.co.uk , verizon prepaid phones , Städ , ferienwohnung misdroy , cars.motors-blog.co.uk , Storstädning , Furniture products