开发者

How to upload image without any php script?

开发者 https://www.devze.com 2023-03-10 00:34 出处:网络
please tell me can i upload image开发者_JAVA百科 from iphone without using php or .net script. i found a code of php

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

0

精彩评论

暂无评论...
验证码 换一张
取 消