1
나는 워드 프레스 플러그인을 만들고 업로드 기능을 만들려고합니다. 업로드move_uploaded_file() wordpress plugin
Warning: move_uploaded_file(logos/5041796eeedf21346468206.jpg) [function.move-uploaded-file]: failed to open stream: No such file or directory in /Applications/XAMPP/xamppfiles/htdocs/wordpress/wp-content/plugins/logo-updating/logo_menu.php on line 15
Warning: move_uploaded_file() [function.move-uploaded-file]: Unable to move '/Applications/XAMPP/xamppfiles/temp/phpeIJRwj' to 'logos/5041796eeedf21346468206.jpg' in /Applications/XAMPP/xamppfiles/htdocs/wordpress/wp-content/plugins/logo-updating/logo_menu.php on line 15
내 코드 :
$tmp = $_FILES['logoUpload']['tmp_name'];
$extension = explode(".", $_FILES['logoUpload']['name']);
$everything = count($extension);
$ext = $extension[$everything - 1];
$newName = uniqid().time().".".$ext;
$newName2 = uniqid().time()."_banner.".$ext;
move_uploaded_file($tmp, "logos/".$newName);
$fullLink = "logos/".$newName;
폴더/로고/어느 폴더에 상대적 그러나, 나는 이러한 오류를 받고 있어요? – Tech163
현재 플러그인 폴더로 이동합니다. – Majo0od
절대 경로를 사용해 보셨습니까? – Steven