Yii框架错误-“;无法打开流:权限被拒绝";

Yii框架错误-“;无法打开流:权限被拒绝";,yii,Yii,我刚刚开始在Windows7机器上使用Yii框架。它给了我这个恼人的错误,当我重新启动计算机时它就消失了 有人能解释一下发生了什么以及如何解决它吗?。。非常感谢 以下是我得到的错误: PHP warning copy(C:\www\corp\assets\96296f5a\js\ckeditor\plugins\imagepaste2.3.zip): failed to open stream: Permission denied C:\www\yii-1.1.13\framework\ut

我刚刚开始在Windows7机器上使用Yii框架。它给了我这个恼人的错误,当我重新启动计算机时它就消失了

有人能解释一下发生了什么以及如何解决它吗?。。非常感谢

以下是我得到的错误:

PHP warning copy(C:\www\corp\assets\96296f5a\js\ckeditor\plugins\imagepaste2.3.zip): failed to open stream: Permission denied C:\www\yii-1.1.13\framework\utils\CFileHelper.php(131) 119 120 $folder=opendir($src); 121 while(($file=readdir($folder))!==false) 122 { 123 if($file==='.' || $file==='..') 124 continue; 125 $path=$src.DIRECTORY_SEPARATOR.$file; 126 $isFile=is_file($path); 127 if(self::validatePath($base,$file,$isFile,$fileTypes,$exclude)) 128 { 129 if($isFile) 130 { 131 copy($path,$dst.DIRECTORY_SEPARATOR.$file); 132 if(isset($options['newFileMode'])) 133 chmod($dst.DIRECTORY_SEPARATOR.$file,$options['newFileMode']); 134 } 135 elseif($level) 136 self::copyDirectoryRecursive($path,$dst.DIRECTORY_SEPARATOR.$file,$base.'/'.$file,$fileTypes,$exclude,$level-1,$options); 137 } 138 } 139 closedir($folder); 140 } 141 142 /** 143 * Returns the files found under the specified directory and subdirectories. Stack Trace #0 + C:\www\yii-1.1.13\framework\utils\CFileHelper.php(131): copy("C:\www\corp\protected\extensions\bootstrap\assets\js\ckeditor\pl...", "C:\www\corp\assets\96296f5a\js\ckeditor\plugins\imagepaste2.3.zi...") #1 + C:\www\yii-1.1.13\framework\utils\CFileHelper.php(136): CFileHelper::copyDirectoryRecursive("C:\www\corp\protected\extensions\bootstrap\assets\js\ckeditor\pl...", "C:\www\corp\assets\96296f5a\js\ckeditor\plugins", "/js/ckeditor/plugins", array(), ...) #2 + C:\www\yii-1.1.13\framework\utils\CFileHelper.php(136): CFileHelper::copyDirectoryRecursive("C:\www\corp\protected\extensions\bootstrap\assets\js\ckeditor", "C:\www\corp\assets\96296f5a\js\ckeditor", "/js/ckeditor", array(), ...) #3 + C:\www\yii-1.1.13\framework\utils\CFileHelper.php(136): CFileHelper::copyDirectoryRecursive("C:\www\corp\protected\extensions\bootstrap\assets\js", "C:\www\corp\assets\96296f5a\js", "/js", array(), ...) #4 + C:\www\yii-1.1.13\framework\utils\CFileHelper.php(63): CFileHelper::copyDirectoryRecursive("C:\www\corp\protected\extensions\bootstrap\assets", "C:\www\corp\assets\96296f5a", "", array(), ...) #5 + C:\www\yii-1.1.13\framework\web\CAssetManager.php(251): CFileHelper::copyDirectory("C:\www\corp\protected\extensions\bootstrap\assets", "C:\www\corp\assets\96296f5a", array("exclude" => array(".svn", ".gitignore"), "level" => -1, "newDirMode" => 511, "newFileMode" => 438)) #6 – C:\www\corp\protected\extensions\bootstrap\components\Bootstrap.php(458): CAssetManager->publish("C:\www\corp\protected\extensions\bootstrap\assets", false, -1, true) 453 if (isset($this->_assetsUrl)) 454 return $this->_assetsUrl; 455 else 456 { 457 $assetsPath = Yii::getPathOfAlias('bootstrap.assets'); 458 $assetsUrl = Yii::app()->assetManager->publish($assetsPath, false, -1, YII_DEBUG); 459 return $this->_assetsUrl = $assetsUrl; 460 } 461 } 462 463 /** #7 – C:\www\corp\protected\extensions\bootstrap\components\Bootstrap.php(163): Bootstrap->getAssetsUrl() 158 * @param string $cssFile the css file name to register 159 * @param string $media the media that the CSS file should be applied to. If empty, it means all media types. 160 */ 161 public function registerAssetCss($cssFile, $media = '') 162 { 163 Yii::app()->getClientScript()->registerCssFile($this->getAssetsUrl() . "/css/{$cssFile}", $media); 164 } 165 166 /** 167 * Registers the core JavaScript. 168 * @since 0.9.8 #8 – C:\www\corp\protected\extensions\bootstrap\components\Bootstrap.php(124): Bootstrap->registerAssetCss("bootstrap.css") 119 /** 120 * Registers the Bootstrap CSS. 121 */ 122 public function registerCoreCss() 123 { 124 $this->registerAssetCss('bootstrap' . (!YII_DEBUG ? '.min' : '') . '.css'); 125 } 126 127 /** 128 * Registers the Bootstrap responsive CSS. 129 * @since 0.9.8 #9 + C:\www\corp\protected\extensions\bootstrap\components\Bootstrap.php(102): Bootstrap->registerCoreCss() #10 + C:\www\yii-1.1.13\framework\base\CModule.php(387): Bootstrap->init() #11 + C:\www\yii-1.1.13\framework\base\CModule.php(523): CModule->getComponent("bootstrap") #12 + C:\www\yii-1.1.13\framework\base\CApplication.php(152): CModule->preloadComponents() #13 + C:\www\yii-1.1.13\framework\YiiBase.php(125): CApplication->__construct("C:\www\corp/protected/config/main.php") #14 + C:\www\yii-1.1.13\framework\YiiBase.php(98): YiiBase::createApplication("CWebApplication", "C:\www\corp/protected/config/main.php") #15 + C:\www\corp\index.php(13): YiiBase::createWebApplication("C:\www\corp/protected/config/main.php") 2013-02-25 11:29:18 Apache/2.2.22 (Win32) PHP/5.3.13 Yii Framework/1.1.13 PHP警告 复制(C:\www\corp\assets\96296f5a\js\ckeditor\plugins\imagepaste2.3.zip):无法打开流:权限被拒绝 C:\www\yii-1.1.13\framework\utils\CFileHelper.php(131) 119 120$folder=opendir($src); 121 while(($file=readdir($folder))!==false) 122 { 123如果($file=='.| |$file==''.') 124继续; 125$path=$src.DIRECTORY\u SEPARATOR.$file; 126$isFile=is_文件($path); 127如果(self::validatePath($base、$file、$isFile、$fileTypes、$exclude)) 128 { 129如果($isFile) 130 { 131副本($path,$dst.DIRECTORY_SEPARATOR.$file); 132如果(设置($options['newFileMode'])) 133 chmod($dst.DIRECTORY_SEPARATOR.$file,$options['newFileMode']); 134 } 135欧元(水平) 136 self::copyDirectoryRecursive($path,$dst.DIRECTORY_SEPARATOR.$file,$base.'/'.$file,$fileTypes,$exclude,$level-1,$options); 137 } 138 } 139美元(文件夹); 140 } 141 142 /** 143*返回在指定目录和子目录下找到的文件。 堆栈跟踪 #0 + C:\www\yii-1.1.13\framework\utils\CFileHelper.php(131):复制(“C:\www\corp\protected\extensions\bootstrap\assets\js\ckeditor\pl…”,C:\www\corp\assets\96296f5a\js\ckeditor\plugins\imagepaste2.3.zi…”) #1 + C:\www\yii-1.1.13\framework\utils\CFileHelper.php(136):CFileHelper::copyDirectoryRecursive(“C:\www\corp\protected\extensions\bootstrap\assets\js\ckeditor\pl.”,“C:\www\corp\assets\96296f5a\js\ckeditor\plugins”,“/js/ckeditor/plugins”,array(),…) #2 + C:\www\yii-1.1.13\framework\utils\CFileHelper.php(136):CFileHelper::copyDirectoryRecursive(“C:\www\corp\protected\extensions\bootstrap\assets\js\ckeditor”,“C:\www\corp\assets\96296f5a\js\ckeditor”,“/js/ckeditor”,array(),…) #3 + C:\www\yii-1.1.13\framework\utils\CFileHelper.php(136):CFileHelper::copyDirectoryRecursive(“C:\www\corp\protected\extensions\bootstrap\assets\js”,“C:\www\corp\assets\96296f5a\js”,“/js”,array(),…) #4 + C:\www\yii-1.1.13\framework\utils\CFileHelper.php(63):CFileHelper::copyDirectoryRecursive(“C:\www\corp\protected\extensions\bootstrap\assets”,“C:\www\corp\assets\96296f5a”,“array(),…) #5 + C:\www\yii-1.1.13\framework\web\CAssetManager.php(251):CFileHelper::copyDirectory(“C:\www\corp\protected\extensions\bootstrap\assets”,“C:\www\corp\assets\96296f5a”,数组(“exclude”=>array(.svn“,.gitignore”),“level”=>-1,“newDirMode”=>511,“newFileMode”=>438)) #6 – C:\www\corp\protected\extensions\bootstrap\components\bootstrap.php(458):CAssetManager->publish(“C:\www\corp\protected\extensions\bootstrap\assets”,false,-1,true) 453如果(isset($this->_assetsUrl)) 454返回$this->_assetsUrl; 455其他 456 { 457$assetsPath=Yii::getPathFalias('bootstrap.assets'); 458$assetsUrl=Yii::app()->assetManager->publish($AssetPath,false,-1,Yii_DEBUG); 459返回$this->_assetsUrl=$assetsUrl; 460 } 461 } 462 463 /** #7 – C:\www\corp\protected\extensions\bootstrap\components\bootstrap.php(163):bootstrap->getAssetsUrl() 158*@param string$cssFile要注册的css文件名 159*@param string$media CSS文件应应用于的媒体。如果为空,则表示所有媒体类型。 160 */ 161公共函数注册表setcss($cssFile,$media='') 162 { 163 Yii::app()->getClientScript()->registerCssFile($this->getAssetsUrl()。“/css/{$cssFile},$media); 164 } 165 166 /** 167*注册核心JavaScript。 168*@自0.9.8 #8 – C:\www\corp\protected\extensions\bootstrap\components\bootstrap.php(124):bootstrap->registerAssetCss(“bootstrap.css”) 119 /** 120*注册引导CSS。 121 */ 122公共功能寄存器corecss() 123 { 124$this->registerAssetCss('bootstrap')(!YII_DEBUG?'.min':'')。.css'); 125 } 126 127 /** 128*注册引导响应CSS。 129*@自0.9.8 #9 + C:\www\corp\protected\extensions\bootstrap\components\bootstrap.php(102):bootstrap->registerCoreCss() #10 + C:\www\yii-1.1.13\framework\base\CModule.php(387):Bootstrap->init() #11 + C:\www\yii-1.1.13\framework\base\CModule.php(523):CModule->getComponent(“引导”) #12 + C:\www\yii-1.1.13\framework\base\capapplication.php(152):CModule->preloadComponents() #13 + C:\www\yii-1.1.13\framework\YiiBase.php(125):capapplication->\uu构造(“C:\www\corp/protected/config/main.php”) #14 + C:\www\yii-1.1.13\framework\YiiBase.php(98):YiiBase::createApplication(“CWebApplication”,“C:\www\corp/protected/config/main.php”) #15 + C:\www\corp\index.php(13):YiiBase::createWebApplication(“C:\www\corp/protected/config/main.php”) 2013-02-25 11:29:18 Apache/2.2.22(Win32)PHP/5.3.13 Yii Framework/1.1.13
该错误基本上表示YII无法在运行时将所需的资产从扩展复制到assets目录

YII项目所在的目录
C:\www\corp
应该可以由web服务器进程写入


我想看看是否有防火墙/防病毒系统阻止web服务器创建文件。尝试读取web服务器日志。

您没有复制的权限。。。我认为你不应该让这个项目在驱动程序C。。。