Page 1 of 1

upload and execute

Posted: Tue May 20, 2008 7:25 pm
by okiesplace
A little help if possible pls...

I have several remote servers that upload sql file to website
files are received using the following code...

<?php
$uploaddir = "filelist/";
$file = $uploaddir . $_FILES['uploadfile']['name'];
move_uploaded_file($_FILES['uploadfile']['tmp_name'], $file)
?>

Having received these files, i would like to auto add the $conn code to file
and then auto execute it.
when executed and data inputted into database. then delete the file.

Would appreciate some advise. I have very little knowledge of PHP

Keith

Re: upload and execute

Posted: Tue May 20, 2008 7:26 pm
by okiesplace
To add to above.

All files received are called xxxxxx-logfile.sql

Thanks