Reply to Re: file upload script

Your name:

Reply:


Posted by gerg on 03/18/06 00:34

Arjen wrote:
> 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


Hi Arjen, thanks for the response, yes, the 'file2upload' is the name of
the file field and I did mean path to upload to not URL. The
administrator needed to tweak the settings on the server so I could
upload from a script like this. All is well now. Thanks!

Greg

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация