parse errors...upload script

From: Date: Wed, 12 Jul 2000 18:23:16 +0000
Subject: parse errors...upload script
Groups: php.general 
Request: Send a blank email to php-general+get-6209@lists.php.net to get a copy of this message
hello....im getting a parse error whenever i try to run this file the script is supposed to upload a file to a dir....depending on which radio button u select the errors: Warning: Unable to open '' for reading: No such file or directory in /opt/web/action/hlthebecoming/pub/docroot/php/upload1.phtml on line 14 Warning: Unlink failed (No such file or directory) in /opt/web/action/hlthebecoming/pub/docroot/php/upload1.phtml on line 15 the script: <? if ($file == "") { echo ' <form action=upload1.phtml method=POST ENCTYPE="multipart/form-data"> <input type=Radio name=url value=1>Path 1<br> <input type=Radio name=url value=2>Path 2<br> <input type="hidden" name="MAX_FILE_SIZE" value="10000000"> <input type=File name=file_name><br> <input type=Submit value=Upload> </form> '; } if ($url == 1) { copy($file, "/my/path/that/is/mine/$file_name"); unlink($file); } if ($url == 2) { copy($file, "/my/path/that/is/mine/$file_name"); unlink($file); } ?>

« previous php.general (#6209) next »