You are here: Re: Upload script error « PHP Programming Language « IT news, forums, messages
Re: Upload script error

Posted by Erwin Moller on 11/13/08 11:33

brian.digipimp@gmail.com wrote:

> So I wrote this upload script and I keep getting errors and can't get
> it to work. I'm running ubuntu linux and here is my code:
>
> <html>
> <head>
> <title>Upload</title>
> </head>
> <body>
> <?php
>
>
> if(isset ($_POST['submit'])) {
> if (move_uploaded_file ($_FILES['file']['tmp_name'],
> "../upload/{$_FILES['file']['name']}")) {

You should put a real path to a directory here instead of a relative one.

And make sure the user that runs as PHP (often apache, nobody, or www-data)
has write-right in that directory.

Good luck.

Regards,
Erwin Moller

 

Navigation:

[Reply to this 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

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