在PHP 3.6中使用Cake时网站加载问题

时间:2018-07-16 06:24:22

标签: cakephp

错误:

  

取消链接(D:\ xampp \ htdocs \ digitalstore / tmp / cache / models / myapp_cake_model_debug_kit_panels):   权限被拒绝[APP / Controller \ AppController.php,第304行]

我的代码:

$base_path = ROOT . '/tmp';
$models      = $base_path.'/cache/models';
$persistent  = $base_path.'/cache/persistent';
$cache_files = array($models,$persistent);


//To delete Cache files
foreach ($cache_files as $filepath) {
    $filepath = $filepath.'/*';
    $files = glob($filepath); //get all file names
    foreach($files as $file){
        if(is_file($file)) {
            unlink($file); //delete file
        }

    }
}

0 个答案:

没有答案