having some problem related to "upload the file through
Posted: Tue Jun 12, 2007 3:14 am
feyd | Please use
and php script is[/syntax]
on executing it , i am getting the error
Warning: move_uploaded_file(upload/todays shedule.txt) [function.move-uploaded-file]: failed to open stream: No such file or directory in C:\Inetpub\wwwroot\forum\upload.php on line 14
Warning: move_uploaded_file() [function.move-uploaded-file]: Unable to move 'C:\WINDOWS\TEMP\phpFE.tmp' to 'upload/todays shedule.txt' in C:\Inetpub\wwwroot\forum\upload.php on line 14
i did each and every possibility to execute it, but could not get susscess.
please try to solve my problem
feyd | Please use
Code: Select all
,Code: Select all
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]
hello friends ,
i am trying the upload a text file through php code , but getting some error,
my code is same as
html form
[syntax="html"]
<html>
<body>
<form action="upload.php" method="post" enctype="multipart/form-data">
<input type="file" name="file">
<input type="submit" name="submit" value="Submit">
</form>
</body>
</html>Code: Select all
<?php
echo "Upload: " . $_FILES["file"]["name"];
echo "Type: " . $_FILES["file"]["type"];
echo "Size: " . ($_FILES["file"]["size"] / 1024);
echo "Temp file: " . $_FILES["file"]["tmp_name"] ;
if (file_exists("upload/" . $_FILES["file"]["name"]))
{
echo $_FILES["file"]["name"] . " already exists. ";
}
else
{
move_uploaded_file($_FILES["file"]["tmp_name"],"upload/" . $_FILES["file"]["name"]);
}
?>Warning: move_uploaded_file(upload/todays shedule.txt) [function.move-uploaded-file]: failed to open stream: No such file or directory in C:\Inetpub\wwwroot\forum\upload.php on line 14
Warning: move_uploaded_file() [function.move-uploaded-file]: Unable to move 'C:\WINDOWS\TEMP\phpFE.tmp' to 'upload/todays shedule.txt' in C:\Inetpub\wwwroot\forum\upload.php on line 14
i did each and every possibility to execute it, but could not get susscess.
please try to solve my problem
feyd | Please use
Code: Select all
,Code: Select all
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]