我有以下文件夹结构:-storage -app -orders -cat1 -cat2在cat1或cat2文件夹中(取决于用户输入),我想创建另一个文件夹并在其中放置一个 xml 文件。这就是我尝试在cat1-folder 中创建目录并将 xml 文件放在那里的方式:$uuid = Uuid::uuid4();$id = $uuid->toString();$path = '/orders/cat1/'.$id;Storage::makeDirectory($path, 0755, true, true);Storage::put($id.'test.xml', $xml);会发生什么:文件夹($id 作为名称)在正确的位置创建:-storage -app -orders -cat1 -123456789 -cat2但是 xml 将存储在此处的另一个文件夹中:-storage -app -123456789 // xml gets stored in another -test.xml // folder within app-folder -orders -cat1 -123456789 // where the xml should be placed -cat2我似乎找到了一种方法将 xml 放在我刚刚创建的目录中。 _。
- 2 回答
- 0 关注
- 197 浏览
添加回答
举报
0/150
提交
取消