Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/ionic-framework/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
PHP远程图像处理,使用Picup移动safari应用程序在我的服务器上保存图像_Php_Iphone - Fatal编程技术网

PHP远程图像处理,使用Picup移动safari应用程序在我的服务器上保存图像

PHP远程图像处理,使用Picup移动safari应用程序在我的服务器上保存图像,php,iphone,Php,Iphone,我无法将图像保存在/image\u upload/uploads/文件夹中(这样我就有希望找到其余的了) 这是我从你那里得到的密码 试试看 或者是打字错误?我想说的是,仅仅是看了你的代码。如果表单上没有显示“选择文件”按钮。 在picup currentParams中Picup.convertFileInput($('photo'),currentParams) “photo”旨在成为您的id=”“而不是“image\u url”谢谢()缺失,这可能不是我唯一的问题,尽管它出现了。酷。另一种选择

我无法将图像保存在/image\u upload/uploads/文件夹中(这样我就有希望找到其余的了)

这是我从你那里得到的密码

试试看


或者是打字错误?

我想说的是,仅仅是看了你的代码。如果表单上没有显示“选择文件”按钮。 在picup currentParams中<代码>Picup.convertFileInput($('photo'),currentParams)
“photo”
旨在成为您的
id=”“
而不是
“image\u url”

谢谢()缺失,这可能不是我唯一的问题,尽管它出现了。酷。另一种选择。在我的服务器上$dir_path=“”;这是行不通的。它必须是/home/content/yadda/yadda/html/image\u upload/uploads/
<?php
//remote image to copy
 $remoteImageURL = 'http://www.mywebsite.com/image.jpg';  //I'm not sure what URL should be here

 //local directory to store image
$dir_path = 'http://www.mywebsite.com/image_upload/uploads/'; 

if($remoteImageURL)
{ 
    require_once('class.get.image.php');

    // initialize the class
    $image = new GetImage;

    // just an image URL
    $image->source = $remoteImageURL;
    $image->save_to = $dir_path; // with trailing slash at the end

    $get = $image->download('curl'); // using cURL

    $pic = $dir_path.basename($remoteImageURL);

    //you can use the picture path e.g. Insert into DB from this variable $pic
 ?>
<script> 
    var currentParams = {}
    document.observe('dom:loaded', function()
    {

        $(document.body).addClassName('iphone');

        // We'll check the hash when the page loads in-case it was opened in a new page
        // due to memory constraints
        Picup.checkHash();  

        // Set some starter params  
        currentParams = {
        'callbackURL'       : 'http://mywebsite.com/upload_pic5.php',   
        'postURL'           :       'http://www.mywebsite.com/image_upload/picup_remote_image.php', 
        'referrername'      : escape('mywebsite'),
        'referrerfavicon'   : escape('http://mywebsite.com/kwboat.ico'),
        'purpose'               : escape('Select your photo for our App.'),
        'debug'         : 'false',
        'returnThumbnailDataURL': 'true',
        'thumbnailSize'         : '150'
        };

        Picup.convertFileInput($('photo'), currentParams);

    });
</script>   

<script type="text/javascript">
    window.name = "fileupload";
</script>
<form action="save.php" method="post" id="add_boat">
<div class="step_bar_info">Upload a Picture of your boat</div>
<div id="image_box">

<div id="upload_area">
<?php if (isset($image_url))
{
    echo '<img src="' . $image_url .'" />';
}
else
{
    echo '<img src="images/boat.png" width="150px"/>';  
} ?>
</div>

<input type="file" name="photo" id="photo"/><br />
Please select your photo to upload, you will need to <a   href="http://itunes.apple.com/us/app/picup/id354101378?mt=8" target="_blank">install Picup App (Free) from iTunes.</a> <br /><br /> Picup is a free iPhone app that facilitates photo uploads to our web app. Since Mobile Safari doesnt support file-upload form fields

<?php $image_url=($pic); ?><!--  gets from image processor though maybe should just change $pic  -->    
</div><!--image box-->
<input type="hidden" id="image_url" name="image_url" value="images/boat.png"/>
<div id="titlebox">Boats name<br/><input name="title" type="text" size="24"   maxlength="60" value="" tabindex="1"></div><!--endtitlebox-->
<div id="info_box">Info<br/><textarea name="info" cols="20" maxlength="100" rows="2"    tabindex="6"></textarea></div>
<input id="add_boat" type="submit" name="add_boat" value="save " alt="submit" title="Save item in our secure database system " />

</form>
// initialize the class
$image = new GetImage();