I want to put this code inside an HTML block:<? function uploadProg($filename1,$filename1_name){ ########Set the destination here############## $destination="Upload"; $address="http://24.65.85.177/games/upload/upload/"; # Complete path t +o file (with trailing slash) copy($filename1,$destination."/".$filename1_name); echo "<FONT COLOR=TAN><b>$filename1_name was uploaded succesfully.</b> +<br><br></FONT>"; echo "<A HREF=\"$address$filename1_name\"><FONT COLOR=TAN><b>$address$ +filename1_name</b></FONT></A><BR><BR><BR>"; } function main(){?> <form method="post" action="upload.php" enctype="multipart/form-data"> Upload Banner:<br> <input type="file" name="filename1" size="20" tabindex="1"><br> <input type="hidden" name="action" value="uploadProg"> <input type="submit" value="Upload Banner" tabindex="6"> </form><?} switch ($action){ default: main(); break; case "uploadProg": if ($filename1=="none") {echo("<BODY BGCOLOR=BLACK><h1><FONT COLOR=TAN +>Please make sure you have selected a valid file\!</h1></FONT></BODY> +"); break;} uploadProg($filename1,$filename1_name); break; } ?>
^^ One main reason I'm using PHP, is because every PERL script I've tried to use for uploading, it has not worked on my server (Win32- Apache).print qq! # code coes here !;
edited: Thu Oct 3 03:22:24 2002 by jeffa - added code tags and applied liberal edits - hope i didn't lose anything ...
In reply to PHP through PERL by FireBird34
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |