TP框架中/ThinkPHP/Library/Think/Storage/Driver/File.class.php 错误

Posted God is Love

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了TP框架中/ThinkPHP/Library/Think/Storage/Driver/File.class.php 错误相关的知识,希望对你有一定的参考价值。

   

/Thinkphp/Library/Think/Storage/Driver/File.class.php  LINE: 48错误

这是一个将windows下运行正常的ThinkPHP框架移到Linux下会出现的一个问题: 

:( 

STORAGE_WRITE_ERROR:./Runtime/Cache/Install/c6bbce5b1f1dcf027c8ceb5cf5141b65.PHP 

错误位置 

FILE: /home/wwwroot/testisale/ThinkPHP/Library/Think/Storage/Driver/File.class.php  LINE: 48 

TRACE 

/#0 /home/wwwroot/testisale/ThinkPHP/Library/Think/Storage/Driver/File.class.php(48): E(‘STORAGE_WRITE…‘) 

/#1 [internal function]: Think\Storage\Driver\File->put(‘./Runtime/Cache…‘, ‘ #2 /home/wwwroot/testisale/ThinkPHP/Library/Think/Storage.class.php(37): call_user_func_array(Array, Array) 

/#3 /home/wwwroot/testisale/ThinkPHP/Library/Think/Template.class.php(114): Think\Storage::__callstatic(‘put‘, Array) 

/#4 /home/wwwroot/testisale/ThinkPHP/Library/Think/Template.class.php(114): Think\Storage::put(‘./Runtime/Cache…‘, ‘ #5 /home/wwwroot/testisale/ThinkPHP/Library/Think/Template.class.php(76): Think\Template->loadTemplate(‘./Application/I…‘, ") 

/#6 /home/wwwroot/testisale/ThinkPHP/Library/Behavior/ParseTemplateBehavior.class.php(32): Think\Template->fetch(‘./Application/I…‘, Array, ") 

/#7 /home/wwwroot/testisale/ThinkPHP/Library/Think/Hook.class.php(119): Behavior\ParseTemplateBehavior->run(Array) 

/#8 /home/wwwroot/testisale/ThinkPHP/Library/Think/Hook.class.php(89): Think\Hook::exec(‘Behavior\ParseT…‘, ‘view_parse‘, Array) 

/#9 /home/wwwroot/testisale/ThinkPHP/Library/Think/View.class.php(126): Think\Hook::listen(‘view_parse‘, Array) 

/#10 /home/wwwroot/testisale/ThinkPHP/Library/Think/View.class.php(72): Think\View->fetch(", ", ") 

/#11 /home/wwwroot/testisale/ThinkPHP/Library/Think/Controller.class.php(56): Think\View->display(", ", ", ", ") 

/#12

ThinkPHP3.2.3 { Fast & Simple OOP PHP Framework } – [ WE CAN DO IT JUST THINK ]

 

 

 

 

 

 

 

 

出现这个问题的原因是项目中的Runtime权限不够,需要给Runtime和其目录下的所有文件授权,读者只需要执行下列命令即可:

chmod -R 777 Runtime

 

http://blog.csdn.net/callouweicheng/article/details/50898351

以上是关于TP框架中/ThinkPHP/Library/Think/Storage/Driver/File.class.php 错误的主要内容,如果未能解决你的问题,请参考以下文章

PHP.51-TP框架商城应用实例-前台3-楼层推荐TP框架雪崩问题

在TP框架中,使用原生SQL有啥弊端

TP框架做网页静态化

TP框架中field查询字段

tp框架总结

TP框架模板中IF Else 如何使用?