이미지를 업로드 할 때 확인을 누릅니다. 보통 다음과 같은 작업을 수행합니다.Laravel 4 url에서 이미지 가져 오기
$file = Input::file('image');
$destinationPath = 'whereEver';
$filename = $file->getClientOriginalName();
$uploadSuccess = Input::file('image')->move($destinationPath, $filename);
if($uploadSuccess) {
// save the url
}
사용자가 이미지를 업로드 할 때 제대로 작동합니다. 하지만 URL에서 이미지를 저장하려면 어떻게해야합니까 ??? 다음
$url = 'http://www.whereEver.com/some/image';
$file = file_get_contents($url);
과 :
내가 좋아하는 뭔가를하려고하면
$filename = $file->getClientOriginalName();
$uploadSuccess = Input::file('image')->move($destinationPath, $filename);
내가받을 다음과 같은 오류 :
그래서Call to a member function move() on a non-object
, 어떻게이에서 이미지를 업로드 할 laravel 4가있는 URL?
에이미가 크게 감사드립니다.
오히려 디렉토리이 패키지는 일을 –