2

is it possible to upload files to web page and then access file data on website using $_FILES['file'] in php?

2
  • Yes, see stackoverflow.com/questions/1131425/…. Commented Jul 24, 2010 at 18:25
  • 4
    Why is this titled and tagged as C# but you're looking to access the files via PHP? Commented Jul 25, 2010 at 0:21

2 Answers 2

2

Use the following code to send file name to php file as POST value and it also stores the returned value

WebClient client = new WebClient();
byte[] bret = client.UploadFile(webpath, "POST", filepath);
string sret = System.Text.Encoding.ASCII.GetString(bret);
Sign up to request clarification or add additional context in comments.

Comments

0

You have to modify your webserver in some way to answer POST requests with the appropriate actions. If you can't acces your server, you can't upload to it with C#; there is no 'standard' way to do this.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.