php - 如何在laravel项目之外设置文件夹目标路径
问题描述
我需要设置$destination
外部项目的路径需要将文件夹从项目文件复制到计算机位置我已经尝试过使用复制目录功能
public function approovenew()
{
$source = "themes/call";
$destination = "/new-theme";
File::copyDirectory(base_path($source), base_path($destination));
}
解决方案
尝试这样做它会帮助你
File::copyDirectory(__DIR__ . '/../whatever'$source, __DIR__ . '/../../$destination');
推荐阅读
- javascript - 使用 Javascript (nodejs) 进行无限长轮询
- azure - 比较两个 Azure SQL DB 之间的数据
- c# - Google Recaptcha 抛出 System.Web.HttpRuntime.WebObjectActivator 错误
- java - 如何偏移(添加或减去)数组中的 ASCII 值以进行编码?
- google-sheets - 这可能吗?如果 >0 移动到下一个单元格,请检查单元格值。重复直到单元格 = 0,返回最后一个非零单元格
- reactjs - TypeError:无法读取未定义的属性“_id”(完整堆栈问题)
- python - 如何使用 groupby 追加列表?ValueError:函数不减少
- c++ - ue4 c++ fps教程第3.2节出错,我该怎么办?
- windows - 删除文件夹中的所有文件,但跳过包含特定字符串的文件
- python - 通过函数创建名称中具有不同数字的变量