|
Posted by Arjen on 03/17/06 17:00
gerg wrote:
> For a simple, no real error checking, bare bones script, would this
> script work for uploading a file? I seem to be having some problems.
> Permissions are set to allow for upload, etc...
>
> <?
>
> if ($_FILES['file2upload']['name'] != ""){
> copy( $_FILES['file2upload']['tmp_name'],"___URL____TO___UPLOAD____TO__"
> . $_FILES['file2upload']['name'] )
> or die ("Could not copy file");
> }
> else
> {
> die("No File Specified");
> }
> ?>
>
>
> 'file2upload' is the name of the html form. Thanks.
file2upload should be the name of the file field, not of the form.
URL__TO__UPLOAD__TO should be path_to_upload to (but im guessing thats
not the problem)
if this doesn;t work post the output
Arjen
Navigation:
[Reply to this message]
|