PC Review


Reply
Thread Tools Rate Thread

Problem uploading a file

 
 
Star
Guest
Posts: n/a
 
      5th Nov 2007
Hi all,


On my server, I have these 2 pages:

upload.html
-----------

<form name="form1" method="post" action="upload.php"
enctype="multipart/form-data">
<p>
<input type="file" name="file">
</p>
<p>
<input type="submit" name="upload" value="upload">
</p>
</form>


upload.php
----------

<?
$laden = move_uploaded_file($HTTP_POST_FILES['file']['tmp_name'],
"./$file_name");
if(!$laden){
echo"<br><b>error</b><br>";} else {
echo"<br><b>done!</b><br>";die;}
?>



If I open upload.html from my browser, select a file and click on
Upload, the file is uploaded correctly.

How can I do that programmatically?
I would like to send a HTTP POST request including the filename of the
file to upload.

I have tried by using HttpWebRequest but I cannot find the way.
Is there an easy way of doing that?

Thanks a lot.







 
Reply With Quote
 
 
 
 
LEM
Guest
Posts: n/a
 
      5th Nov 2007

Nobody knows anything about this?
 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
getting problem when uploading a file to other server rajeev ranjan Microsoft C# .NET 1 5th Aug 2008 03:22 PM
Problem Uploading File Using FtpWebRequest daveh42 Microsoft ASP .NET 1 18th Dec 2007 09:40 PM
Problem while File Uploading Using AJAX Ram Microsoft ASP .NET 1 31st Aug 2007 12:41 AM
Problem in uploading the file in network raja Microsoft ASP .NET 0 22nd Mar 2007 11:26 AM
Uploading file problem Jonathan Microsoft Dot NET 1 27th Oct 2004 10:55 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 10:44 PM.