Cannot upload file with php 5.0.4 on windows xp
- From: "svyatoslav" <pieter_van_landuyt@xxxxxxxxxxx>
- Date: 23 Aug 2005 03:51:46 -0700
Hello,
I'm trying to upload a file from my localhost IIS server to a local
folder named test, but I'm getting some errors.
Warning: move_uploaded_file(C:\test) [function.move-uploaded-file]:
failed to open stream: Permission denied in
C:\sourcecode\admin\popup.php on line 6
Warning: move_uploaded_file() [function.move-uploaded-file]: Unable to
move 'C:\PHP\uploadtemp\php32.tmp' to 'C:\test' in
C:\sourcecode\admin\popup.php on line 6
I have given the internet user account rights on the PHP folder, the
sourcecode folder and the upload folder test.
Could someone please let me know what I should do to make this work.
Thanks.
Pieter Van Landuyt
source code:
uploadfile.php
<form enctype="multipart/form-data" action="popup.php" method="post">
<input type="hidden" name="MAX_FILE_SIZE" value="100000000000">
Upload dit bestand: <input name="userfile" type="file">
<input type="submit" value="Upload!">
</form>
popup.php
<?php
$filename=$_FILES['userfile']['name'];
if($filename!="")
{
move_uploaded_file($_FILES['userfile']['tmp_name'],'.\\');
}
else
{
echo "filename null";
}
?>
.
- Follow-Ups:
- Prev by Date: Re: PEM public key ?!!
- Next by Date: Re: Treatemeant of Errors
- Previous by thread: Treatemeant of Errors
- Next by thread: Re: Cannot upload file with php 5.0.4 on windows xp
- Index(es):
Relevant Pages
|