Hi ! Thank you for the reply
$tmp_file=C:\WI NNT\TEMP\php1C. tmp><?php
if( isset($_POST['upload']) )
{
$content_dir = 'upload/'; // folder that file will move into
$tmp_file = $_FILES['fichier']['tmp_name'];
// copy the file into the folder
$name_file = $_FILES['fichier']['name'];
Hi,
Never trust your own code. ;-)
In case of problems: output what you are doing.
So add here:
echo "\$tmp_file=$tm p_file<hr>";
$target = $content_dir . $name_file;
echo "\$target=$targ et<hr>";
What output does that give?
--------------------------------------------------------------------------------
$target=upload/Guitarre.jpg
--------------------------------------------------------------------------------
that means all paths are correct
Do you recognize the directories?I think the directories are ok.
Is the targetdirectory writable by PHP?Target directory is read & write allowed (tested with cmd and explorer copy
& propriety)
but if it is writable by PHP, I do not know and I think the pb is from here
!
something wrong in my php.ini (version 5.2.1) that it can not writable by
PHP
do you have an idea ?
=============== =============== =============== =============== =============
Again the errors :
Warning: move_uploaded_f ile(upload/Guitarre.jpg)
[function.move-uploaded-file]: failed to open stream: Permission denied in
C:\Inetpub\wwwr oot\simple.php on line 27
Warning: move_uploaded_f ile() [function.move-uploaded-file]: Unable to move
'C:\WINNT\TEMP\ php1C.tmp' to 'upload/Guitarre.jpg' in
C:\Inetpub\wwwr oot\simple.php on line 27
Impossible copy into the folder upload