0
Aviary를 사용하여 사진을 편집하고이 스크립트를 응용 프로그램에서 실행합니다. 다음과 같이Aviary 및 Codeigniter 비어있는 파일 저장
<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 파일에서 무엇을 더해야합니까?
보십시오. 너는 무엇을 얻 느냐? – iamsleepy
나는 php가 처리 된 페이지를 본적이 없다. 그것은'ajax'와 비슷합니다. 그래서'$ image_data'를 echo 할 때조차도 아무것도 볼 수 없습니다. – user2673735