1分钟部署网站📞AI智能客服,大模型训练自有数据,简单好用,有效降低客服成本 广告
在IIS服务器环境下,无法在项目根目录创建文件夹,但是在Apache或Nginx下是可以的。为了兼容不同的环境,需要修改onethink清除缓存的操作: ## 项目根目录下有cc.php文件,把原来的内容替换成下面的-- ``` <?php $dirname = './Runtime/'; //清文件缓存 $dirs = array($dirname); //清理缓存 foreach($dirs as $value) { rmdirr($value); echo "<div style='border:2px solid green; background:#f1f1f1; padding:20px;margin:20px;width:800px;font-weight:bold;color:green;text-align:center;'>\"".$value."\" have been cleaned clear! </div> <br /><br />"; } 改为: <?php //清文件缓存 $dirs = array('./Runtime/Cache','./Runtime/Data','./Runtime/Logs','./Runtime/Temp','./Runtime/common~runtime.php'); //清理缓存 foreach($dirs as $value) { rmdirr($value); echo "<div style='border:2px solid green; background:#f1f1f1; padding:20px;margin:20px;width:800px;font-weight:bold;color:green;text-align:center;'>\"".$value."\" have been cleaned clear! </div> <br /><br />"; } ```