本文整理汇总了PHP中files::file_Write方法的典型用法代码示例。如果您正苦于以下问题:PHP files::file_Write方法的具体用法?PHP files::file_Write怎么用?PHP files::file_Write使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类files
的用法示例。
在下文中一共展示了files::file_Write方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: files
* @time 20111004
*/
//初始化
$pagetitle = '基本信息';
$pagepower = 'sys';
//基本部分
require 'checkpower.inc.php';
//功能部分
include_once WEB_INC . 'file.class.php';
include_once WEB_INC . 'string.class.php';
if (isset($submit)) {
$FS = new files();
$STR = new C_STRING();
$info = array('isclose' => $isclose, 'closeinfo' => $closeinfo, 'webtitle' => $webtitle, 'indextitle' => $indextitle, 'webkeywords' => $webkeywords, 'webdescription' => $webdescription, 'webcopyright' => $webcopyright, 'webbeian' => $webbeian, 'templates' => $systemplates);
$rs_msg = $STR->safe($info);
if ($FS->file_Write($rs_msg, WEB_INC . 'sys.inc.php', 'sys')) {
errorInfo('编辑成功');
} else {
errorInfo();
}
} else {
$rs_sys = $sys;
$templatesList = array();
function getTemplatesList()
{
global $config;
$handler = opendir(WEB_ROOT . $config['defaultTemplates']);
while (($filename = readdir($handler)) !== false) {
//务必使用!==,防止目录下出现类似文件名“0”等情况
if ($filename != "." && $filename != "..") {
$files[] = $filename;
示例2: make_module_cache
function make_module_cache()
{
$tmp_path = WEB_MODULE;
$tmp_my_path = dir($tmp_path);
$cache_modtype = array();
$cache_modmenu = array();
$cache_modpower = array();
while ($tmp_my_file = $tmp_my_path->read()) {
if (is_dir("{$tmp_path}{$tmp_my_file}") and $tmp_my_file != "." and $tmp_my_file != "..") {
if (is_file("{$tmp_path}{$tmp_my_file}/info.install.php")) {
include "{$tmp_path}{$tmp_my_file}/info.install.php";
//$config['modtype_module']
foreach ($moduleController as $value) {
$cache_modtype['module'][] = $value;
}
//$config['modtype_module_arr']
$cache_modtype['module_arr'][$moduleName] = $moduleController;
//$config['modmenu_module']
if (isset($moduleMenu)) {
$cache_modmenu[$moduleName] = $moduleMenu;
}
//$config['modpower_module']
if (isset($modulePower)) {
$cache_modpower['module'][$moduleName] = $modulePower;
}
//$config['modpower_module_class']
if (isset($moduleClassPower)) {
$cache_modpower['module_class'][$moduleName] = $moduleClassPower;
}
unset($moduleName, $moduleController, $moduleMenu, $modulePower, $moduleClassPower);
}
}
}
if (!class_exists('files')) {
include_once WEB_INC . 'file.class.php';
}
$FS = new files();
$FS->file_Write($cache_modtype, WEB_CACHE . 'modtype.cache.php', 'cache_modtype');
$FS->file_Write($cache_modmenu, WEB_CACHE . 'modmenu.cache.php', 'cache_modmenu');
$FS->file_Write($cache_modpower, WEB_CACHE . 'modpower.cache.php', 'cache_modpower');
$tmp_my_path->close();
}