please tell me can i upload image开发者_JAVA百科 from iphone without using php or .net script. i found a code of php
<?php
$uploaddir = '/myappname/uploads/';
$file = basename($_FILES['userfile']['name']);
$uploadfile = $uploaddir . $file;
if (move_uploaded_file($_FILES['userfile']['tmp_name'], $uploadfile)) {
echo "http://www.mycompanywebsite.com/myappname/uploads/{$file}";
}
?>
by hitting URL i think image will be uploaded but can i upload without help of server side script?
Waiting for your kind reply :)
There is a way to upload a photo from the iPhone without using server side script. You could FTP the photo. You would need your server to be an FTP server. Not the most secure thing in the world, but technically all the work is done on the phone side without server side code.
FTP sample code
You can't upload a file to your server/hosting without PHP. (Or some other server side script).
If that would be possibile I could deface every site on the net
精彩评论