Home > Backend Development > PHP Tutorial > yii2 Trying to copy a directory to itself or a subdirectory

yii2 Trying to copy a directory to itself or a subdirectory

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-06-06 20:10:09
Original
1751 people have browsed it

用php composer.phar 添加了个扩展 就报这个错误了
上次也遇到过 莫名其妙的好了 好像记得我只清空了web目录下的缓存
可这次却不行了

<code>public static function copyDirectory($src, $dst, $options = [])
    {
        if ($src === $dst || strpos($dst, $src) === 0) {
            throw new InvalidParamException('Trying to copy a directory to itself or a subdirectory.');
        }
        if (!is_dir($dst)) {
            static::createDirectory($dst, isset($options['dirMode']) ? $options['dirMode'] : 0775, true);
        }
 
        $handle = opendir($src);
        if ($handle === false) {
            throw new InvalidParamException("Unable to open directory: $src");
        }</code>
Copy after login
Copy after login

有遇到类似情况的或有解决方法的 同学 提个醒啊 谢谢

回复内容:

用php composer.phar 添加了个扩展 就报这个错误了
上次也遇到过 莫名其妙的好了 好像记得我只清空了web目录下的缓存
可这次却不行了

<code>public static function copyDirectory($src, $dst, $options = [])
    {
        if ($src === $dst || strpos($dst, $src) === 0) {
            throw new InvalidParamException('Trying to copy a directory to itself or a subdirectory.');
        }
        if (!is_dir($dst)) {
            static::createDirectory($dst, isset($options['dirMode']) ? $options['dirMode'] : 0775, true);
        }
 
        $handle = opendir($src);
        if ($handle === false) {
            throw new InvalidParamException("Unable to open directory: $src");
        }</code>
Copy after login
Copy after login

有遇到类似情况的或有解决方法的 同学 提个醒啊 谢谢

重新编辑了AppAsset的sourcePath,就可以了

<code>public $sourcePath = '@webroot/adminlte';
    public $baseUrl = '@web';
    public $css = [
        'dist/css/AdminLTE.min.css',
    ];
    public $js = [
        'dist/js/app.min.js',

    ];</code>
Copy after login
Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Issues
php data acquisition?
From 1970-01-01 08:00:00
0
0
0
PHP extension intl
From 1970-01-01 08:00:00
0
0
0
How to learn php well
From 1970-01-01 08:00:00
0
0
0
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template