質問

I am a bit of a dummy when it comes to php. I was wondering how to save a file uploaded to a php script (using POST) to a specific location. So for example i want to save it in the directory www.mysite.co.nz/data/motelname/

Also the android sends pairs of data, so how would i make that data into a file with the first bit of data the file name and the second the .txt file data.

If there are any tutorials on this please comment the here too thanks.

役に立ちましたか?

解決

check out these:

http://www.htmlgoodies.com/beyond/php/article.php/3472551/PHP-Tutorial-Uploading-Files.htm

http://www.sitepoint.com/handle-file-uploads-php/

you can move the uploaded file to every folder that has 777-rights (do it with "chmod 777 foldername" on the shell) via

move_uploaded_file($tmp_name, "my_directory/$filename");
ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top