だから私は Aviary を使って写真を編集しており、アプリケーションを実行するこのスクリプトがあります。
<script type='text/javascript'>
var featherEditor = new Aviary.Feather({
apiKey: '',
apiVersion: 3,
theme: 'light', // Check out our new 'light' and 'dark' themes!
tools: 'all',
appendTo: '',
onSave: function (imageID, newURL) {
},
postUrl: 'http://beta.usd309bands.org/upload/saveEditiedImage/',
onError: function (errorObj) {
alert(errorObj.message);
}
});
function launchEditor(id, src) {
featherEditor.launch({
image: id,
url: src
});
return false;
}
</script>
そして、既存の画像を編集した画像に置き換えるための私のphpコードは次のとおりです。
$image_data = file_get_contents($_REQUEST['url']);
file_put_contents("static/images/gallery/image1.jpg",$image_data);
このスクリプトは、既存のファイルにアクセスして上書きします。しかし、それは何もないように上書きします。ただの空のimage1.jpg
ファイル。
ここで何が間違っていますか?php ファイルでさらに何をする必要がありますか?