mkdir():在IIS8上的laravel上导出Excel文件时,文件存在

mkdir():在IIS8上的laravel上导出Excel文件时,文件存在,laravel,iis-8,php-7.2,maatwebsite-excel,Laravel,Iis 8,Php 7.2,Maatwebsite Excel,我正在尝试使用maatwebsite/Excel软件包从laravel导出Excel文件,本地一切正常,但当我想将其放在IIS服务器上时,出现以下错误: 以下是导致控制器中出现错误的代码: $date = Carbon::now()->format("d-m-y-h-m-s"); $data1= json_decode( json_encode($data), true); $export = new ExcelExport((array) $data1); $file= Excel::

我正在尝试使用maatwebsite/Excel软件包从laravel导出Excel文件,本地一切正常,但当我想将其放在IIS服务器上时,出现以下错误:

以下是导致控制器中出现错误的代码:

$date = Carbon::now()->format("d-m-y-h-m-s");
$data1= json_decode( json_encode($data), true);
$export = new ExcelExport((array) $data1);
$file= Excel::store($export,storage_path('app')."\jobshistorie".$date.".xlsx", "local");
我将整个项目目录的权限授予了服务器。 我在公共目录中还有web.config文件:

    <?xml version="1.0" encoding="UTF-8"?>
<configuration>
    <system.webServer>
        <rewrite>
          <rules>
            <rule name="Rule 1" stopProcessing="true">
              <match url="^(.*)/$" ignoreCase="false" />
              <action type="Redirect" redirectType="Permanent" url="/{R:1}" />
            </rule>
            <rule name="Rule 2" stopProcessing="true">
              <match url="^" ignoreCase="false" />
              <conditions>
                <add input="{REQUEST_FILENAME}" matchType="IsDirectory" ignoreCase="false" negate="true" />
                <add input="{REQUEST_FILENAME}" matchType="IsFile" ignoreCase="false" negate="true" />
              </conditions>
              <action type="Rewrite" url="index.php" />
            </rule>
          </rules>
        </rewrite>
    </system.webServer>
</configuration>


我需要所有能得到的帮助,谢谢

我想我迟到了,但您可以尝试清除缓存,如下所示: php artisan配置:缓存 或 php artisan配置:清除


希望能有所帮助。

您正在覆盖一个已经存在的文件吗?@namelivia否,我根据Carbon返回的当前时间戳为每个文件命名,因此没有两个文件具有相同的名称。您可以尝试更改config/excel.php中的临时文件夹。这可能是权限问题。我确实将其更改为:`temporary\u files=>['local_path'=>storage_path(“app/jobsHistorie”),'remote_disk'=>null,]`但它仍然不工作