PHP报错fopen(C:\data\live_dem...

我的系统是windows,写法是
private function getHandle($channelName) {
if($this->_handleArr[$channelName]) {
return $this->_handleArr[$channelName];
}
date_default_timezone_set('PRC');
$nowTime = time();
$logSuffix = date('Ymd', $nowTime);
$handle = fopen($this->_path . '/' . $channelName . $logSuffix . ".log", 'a');
$this->_handleArr[$channelName] = $handle;
return $handle;
}
$handle = fopen($this->_path . '/' . $channelName . $logSuffix . ".log", 'a');这一行报错

fopen(C:\data\live_demo_service\common/..//log//interface_info20161111.log): failed to open stream: No such file or directory in C:\data\live_demo_service\common\MiniLog.php on line 57

初次使用,请解决

http://bbs.csdn.net/topics/392047142

//log// 这是目录名?

先把你的目录名打印一下看看,如果不正确重新制作调整就行了,写代码排错调试能力很重要,你这个明显是目录不正确,别纠结其它原因了!

     你这个路径名拼接有问题啊,把各个值打印输出一下看看,这类问题应该很好进行修改的。