[英]Google Api Client Php - mkdir():Permission denied
使用php的google api客户端获取某些数据,我遇到了以下错误,到目前为止,我似乎找不到任何有效的解决方案。
mkdir(): Permission denied
$storageDir = $this->path . '/' . substr(md5($file), 0, 2);
if ($forWrite && ! is_dir($storageDir)) {
if (! mkdir($storageDir, 0755, true)) {
throw new Google_Cache_Exception("Could not create storage directory: $storageDir");
}
我检查了权限,用户和组。 一切都很好,但我不知道出了什么问题。 知道为什么会这样吗?
通过将$this->path
替换$this->path
storage_path()
解决了该问题
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.