How to cache php variables as a file
This article mainly introduces how to cache php variables in the form of a file, which is very detailed and has a certain reference value. Interested friends must read it!
The specific implementation methods are as follows:
* / $cache_Content = unserialize ($cache_Content); return $cache_Content;} else {include_once ($file); return $var;}} / / create directory private function makeDir ($dir, $mode = 0777) {if (! $dir) return 0; $dir = str_replace ("\", "/", $dir); $mdir = "; foreach (explode (" / ", $dir) as $val) {$mdir. = $val." / " If ($val = = ".." | | $val = = "." | | trim ($val) = = "") continue; if (! File_exists ($mdir)) {if (! @ mkdir ($mdir, $mode)) {return false;} return true;}? > the above is all the content of the article "how to cache php variables in a file". Thank you for reading! Hope to share the content to help you, more related knowledge, welcome to follow the industry information channel!