无法创建缓存目录 .. 或目录不可写。在 RainTPL 中没有缓存的情况下继续
Cannot create cache directory .. or directory is not writable. Proceeding without cache in RainTPL
我创建了一个新的 RainTPL 项目。当我转到我的文件 Index.html 查看结果时显示跟随错误。
Fatal error: Uncaught Rain\Tpl\Exception: Cache directory
cache/doesn't have write permission. Set write permission or set
RAINTPL_CHECK_TEMPLATE_UPDATE to FALSE. More details on
http://www.raintpl.com/Documentation/Documentation-for-PHP-developers/Configuration/
in
/Applications/XAMPP/xamppfiles/htdocs/aLittleBitOfPhp/tpl/vendor/rain/raintpl/library/Rain/Tpl/Parser.php:223
Stack trace: #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} thrown in
/Applications/XAMPP/xamppfiles/htdocs/aLittleBitOfPhp/tpl/vendor/rain/raintpl/library/Rain/Tpl/Parser.php
on line 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
那么正确的做法就是不使用 ./
您必须进入项目目录并在终端上使用它。
chmod 777 cache
感谢 mim 的帮助。
我创建了一个新的 RainTPL 项目。当我转到我的文件 Index.html 查看结果时显示跟随错误。
Fatal error: Uncaught Rain\Tpl\Exception: Cache directory cache/doesn't have write permission. Set write permission or set RAINTPL_CHECK_TEMPLATE_UPDATE to FALSE. More details on http://www.raintpl.com/Documentation/Documentation-for-PHP-developers/Configuration/ in /Applications/XAMPP/xamppfiles/htdocs/aLittleBitOfPhp/tpl/vendor/rain/raintpl/library/Rain/Tpl/Parser.php:223 Stack trace: #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} thrown in /Applications/XAMPP/xamppfiles/htdocs/aLittleBitOfPhp/tpl/vendor/rain/raintpl/library/Rain/Tpl/Parser.php on line 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
那么正确的做法就是不使用 ./
您必须进入项目目录并在终端上使用它。
chmod 777 cache
感谢 mim 的帮助。