【问题标题】:Cannot create cache directory .. or directory is not writable. Proceeding without cache in RainTPL无法创建缓存目录.. 或目录不可写。在 RainTPL 中不使用缓存继续
【发布时间】:2018-10-11 07:44:20
【问题描述】:

我创建了一个新的 RainTPL 项目。当我转到我的文件 Index.html 以查看结果时显示以下错误。

致命错误:Uncaught Rain\Tpl\Exception:缓存目录 缓存/没有写权限。设置写权限或设置 RAINTPL_CHECK_TEMPLATE_UPDATE 为 FALSE。更多详情 http://www.raintpl.com/Documentation/Documentation-for-PHP-developers/Configuration/ 在 /Applications/XAMPP/xamppfiles/htdocs/aLittleBitOfPhp/tpl/vendor/rain/raintpl/library/Rain/Tpl/Parser.php:223 堆栈跟踪:#0 /Applications/XAMPP/xamppfiles/htdocs/aLittleBitOfPhp/tpl/vendor/rain/raintpl/library/Rain/Tpl.php(262): Rain\Tpl\Parser->compileFile('index', NULL, 'tpl/', 'tpl/index.html', 'cache/index.6f6...') #1 /Applications/XAMPP/xamppfiles/htdocs/aLittleBitOfPhp/tpl/vendor/rain/raintpl/library/Rain/Tpl.php(63): Rain\Tpl->checkTemplate('index') #2 /Applications/XAMPP/xamppfiles/htdocs/aLittleBitOfPhp/tpl/index.php(20): Rain\Tpl->draw('index') #3 {main} 投入 /Applications/XAMPP/xamppfiles/htdocs/aLittleBitOfPhp/tpl/vendor/rain/raintpl/library/Rain/Tpl/Parser.php 在第 223 行

然后当我去终端安装使用:

chmod 777 ./cache
chmod 755 ./cache
chown -R admin  ./cache

显示跟随错误。

chmod: ./cache: No such file or directory

chown: ./cache: No such file or directory

我正在使用 macOS Sierra

【问题讨论】:

  • 你能在没有./部分或完整路径的情况下再试一次吗?
  • 它在 tpl 目录上工作,现在它的工作感谢伙伴

标签: php task-parallel-library raintpl


【解决方案1】:

那么正确的做法就是不使用./

您必须进入项目目录并在终端上使用它。

chmod 777 cache

感谢mim 的帮助。

【讨论】:

    猜你喜欢
    • 2016-06-22
    • 2015-01-02
    • 2015-10-21
    • 2020-03-17
    • 2013-10-05
    • 2020-02-09
    • 2011-05-25
    • 2013-11-07
    • 1970-01-01
    相关资源
    最近更新 更多