/ Forside / Teknologi / Udvikling / PHP / Nyhedsindlæg
Login
Glemt dit kodeord?
Brugernavn

Kodeord


Reklame
Top 10 brugere
PHP
#NavnPoint
rfh 3959
natmaden 3372
poul_from 3310
funbreak 2700
stone47 2230
Jin2k 1960
Angband 1743
Bjerner 1249
refi 1185
10  Interkril.. 1146
move_uploaded_file
Fra : Sam Nikolaj Thomsen


Dato : 11-01-02 19:59

Jeg har formen:

<form enctype="multipart/form-data" action="upload.php" method="post">
<input type="hidden" name="10000" value="1000">
Send this file: <input name="userfile" type="file">
<input type="submit" value="Send File">
</form>


Kalder Upload.php :

<?
move_uploaded_file($userfile, "/home/sam/studi/opg/upload/");
?>

Giver fejlen

Warning: Unable to create '/home/sam/studi/opg/upload/': Is a directory in
/home/sam/studi/opg/upload.php on line 5

Warning: Unable to move '/tmp/phpYfFhed' to '/home/sam/studi/opg/upload/' in
/home/sam/studi/opg/upload.php on line 5

Hvad gør jeg forkert?

Mvh.

Sam Nikolaj Thomsen






 
 
Morten Winther (11-01-2002)
Kommentar
Fra : Morten Winther


Dato : 11-01-02 20:13


"Sam Nikolaj Thomsen" <sam@studi.dk> wrote in message
news:5FG%7.13203$aS.1799689@news010.worldonline.dk...

> Warning: Unable to create '/home/sam/studi/opg/upload/': Is a directory in
> /home/sam/studi/opg/upload.php on line 5
>
> Warning: Unable to move '/tmp/phpYfFhed' to '/home/sam/studi/opg/upload/'
in
> /home/sam/studi/opg/upload.php on line 5
>
> Hvad gør jeg forkert?

bool move_uploaded_file (string filename, string destination)

This function checks to ensure that the file designated by filename is a
valid upload file (meaning that it was uploaded via PHP's HTTP POST upload
mechanism). If the file is valid, it will be moved to the filename given by
destination.

Som du kan læse i manualen skal destination være et filnavn og ikke blot en
mappe.

/ morten



Søg
Reklame
Statistik
Spørgsmål : 177505
Tips : 31968
Nyheder : 719565
Indlæg : 6408554
Brugere : 218887

Månedens bedste
Årets bedste
Sidste års bedste