range

If there were you, the world would be just right

<?php
$url = "http://local.test.com/upload.php";
$post_data = array(
    "file" => new CURLFile(realpath('1.jpg')),
);
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $post_data);
$output = curl_exec($ch);
curl_close($ch);
echo $output;
?>

添加新评论 »

在这里输入你的评论...