copy 可以执行,rename 就报拒绝访问

public function replace($path, $content)
{
        // If the path already exists and is a symlink, get the real path...
        clearstatcache(true, $path);

        $path = realpath($path) ?: $path;

        $tempPath = tempnam(dirname($path), basename($path));

        // Fix permissions of tempPath because `tempnam()` creates it with permissions set to 0600...
        chmod($tempPath, 0777 - umask());

        file_put_contents($tempPath, $content);

        rename($tempPath, $path);

}

这段代码位于vendor\laravel\framework\src\Illuminate\Filesystem\Filesystem.php第132行,执行php artisan package:discover后,rename会报拒绝访问的错误,但是改成copy就不会报错。

  1. 系统环境:windows10 64位
  2. php版本:7.3
  3. web服务器:apache
《L04 微信小程序从零到发布》
从小程序个人账户申请开始,带你一步步进行开发一个微信小程序,直到提交微信控制台上线发布。
《L03 构架 API 服务器》
你将学到如 RESTFul 设计风格、PostMan 的使用、OAuth 流程,JWT 概念及使用 和 API 开发相关的进阶知识。
讨论数量: 1

讨论应以学习和精进为目的。请勿发布不友善或者负能量的内容,与人为善,比聪明更重要!