Hello there , how's everything is going ?
hope everything is great
this is my first post in PHPBuilder.com 🙂 (sorry for my english , it's not that good :queasy: )
i was working on a remote upload script , (personal use) and if it works , i may offer it for others 🙂
but i had a problem moving the files from the main folder to the /uploads folder
the script is all about 2 pages (index.html , upload.php)
and here is the codes
INDEX.HTML
<form action="upload.php" method="post">
<input name="fileurl" id="fileurl" size="67">
<input type="image" src="images/upload.gif" alt="Upload File"></td>
</form>
UPLOAD.PHP
<?php
$newurl=($_POST['fileurl']);
define('BUFSIZ', 4096);
$url = $newurl;
$rfile = fopen($url, 'r');
$lfile = fopen(basename($url), 'w');
while(!feof($rfile))
fwrite($lfile, fread($rfile, BUFSIZ), BUFSIZ);
fclose($rfile);
fclose($lfile);
echo '<p align="center"><b><font face="Tahoma" size="5" color="#339933">Upload Complete !</font></b></p>';
echo '<br>';
echo '<p align="center"><b><font face="Tahoma" size="3" color="#339933"><a href="index.php">Upload another file</a></font></b></p>';
?>
DIRECTORIES TREE
--[Main]
----index.html
----upload.php
----[uploads]
the script is working , but the uploaded files being saved in the [Main] Dir
and i've tried every single way to move 'em to the [uploads] Dir
but nothing works :mad:
can you help me with this please 😕
thanks in advanced