파일을 옮기고 싶을 때, laravel은 에러를 일으키고, 나는 왜 그런지 이해하지 못합니다. Laravel 5.2 - 파일을 찾을 수 없습니다 (있는 동안);
이
내가 서버에서 볼 때 나는, 그러나을받는 오류가 그 일 파일 ( 를가 4 일의)local.ERROR: exception 'League\Flysystem\FileNotFoundException' with message 'File not found at path: Ad_Pictures/waitinglist/6f6232707e65c7803f7af248a07cb8cesony-z5-familytn videos ad.jpg'
은 여기가 내 파일을 이동하는 데 사용하는 코드
$newAd = DB::table('ads')->orderBy('created_at', 'desc')->first();
$Ad = Ad::find($newAd->id);
$oldDestination_path = "Ad_Pictures/waitinglist/";
$newDestination_path = "Ad_Pictures/".$newAd->id."/";
if(!is_dir($newDestination_path))
{
mkdir($newDestination_path);
}
Storage::move($oldDestination_path.'/'.$file, $newDestination_path.'/'.$file);
그는 문제없이 새로운 디렉토리를 만들고, 파일을 옮기지 않습니다.
캡쳐 화면이 정확히 표시됩니다 - i 번째 Ad_Pictures/waitinglist 또는/Ad_Pictures /입니까? – herrjeh42
그리고 : 파일 이름에 공백이없는 파일로 동일한 코드를 시도 했습니까? 당신은 결코 알지 못합니다 ... ;-) – herrjeh42
dedtination과 name 변수를 덤프 해 봅시다. laravel은 저장소 폴더에서 lookibg입니다. public foldef에있는 파일을 가지고 있습니다. –