Ich bin mit dieser Logik verwirrt. Ich benutze Laravel 5.2 Storage :: makeDirectory, um zwei Pfade zu erstellen, zuerst (video/) wird korrekt erstellt und die andere (thumbnails/) nicht. Hier
$user = 1;
if(!File::exists(public_path() . "/video/$user"))
{
Storage::makeDirectory(public_path() . "/video/$user", 0777);
}
$file = rand(1111111111111, 9999999999999);
$imgpath = public_path() . "/thumbnails/$file";
if(!File::exists($imgpath))
{
Storage::makeDirectory($imgpath, 0777);
}
ist die Erlaubnis Konfiguration:
mkdir /home/ubuntu/workspace/site/public/thumbnails/6300643852187
Irgendwelche Vorschläge:
drwxrwxrwx 2 ubuntu ubuntu 4096 Jun 28 19:33 thumbnails/
drwxrwxrwx 3 ubuntu ubuntu 4096 Jun 29 15:21 video/
ich auch ein Verzeichnis von cli mit dem angegebenen String aus $ IMGPATH schaffen könnte?
Hm ...Ich sehe jetzt keine Fehler, können Sie einfach 'mkdir ($ imgpath, 0777, false) versuchen;' ohne irgendwelche Bedingungen? – GONG
Nein, es funktioniert nicht. –
können Sie bitte '$ imgpath' auflisten? (Ich weiß, das ist jedes Mal anders, aber ich muss es sehen) – GONG