|
Posted by Erwin Moller on 10/31/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]
|