当前位置: 首页>>代码示例>>PHP>>正文


PHP FileUtil::writeFileContent方法代码示例

本文整理汇总了PHP中FileUtil::writeFileContent方法的典型用法代码示例。如果您正苦于以下问题:PHP FileUtil::writeFileContent方法的具体用法?PHP FileUtil::writeFileContent怎么用?PHP FileUtil::writeFileContent使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在FileUtil的用法示例。


在下文中一共展示了FileUtil::writeFileContent方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: createAdressCacheFile

 public function createAdressCacheFile()
 {
     $addressList = $this->dbGetAllAddress();
     $addressList = $addressList['resultList'];
     $address = $firstAddress = null;
     if ($addressList) {
         foreach ($addressList as $val) {
             $address[$val['id']] = $val;
             $childAddress = $this->getChildAddressById($val['id'], $addressList);
             if ($childAddress) {
                 $address[$val['id']]['child'] = $childAddress;
             }
             if ($val['parentid'] == 0) {
                 $val['child'] = $childAddress;
                 $firstAddress[$val['id']] = $val;
             }
         }
         $address[0]['child'] = $firstAddress;
     }
     $string_start = "<?php\n \$mobileaddress=";
     $string_process = var_export($address, TRUE);
     $string_end = ";\n?>";
     $string = $string_start . $string_process . $string_end;
     FileUtil::writeFileContent($this->cacheFile, $string);
 }
开发者ID:lzmyoyo,项目名称:ninxingfu,代码行数:25,代码来源:addressModel.php

示例2: createCategoryCacheFile

 public function createCategoryCacheFile()
 {
     $this->dbGetAllCategory();
     $categoryList = $this->categoryList['resultList'];
     $category = $firstCategory = null;
     if ($categoryList) {
         foreach ($categoryList as $val) {
             $category[$val['id']] = $val;
             $childCategory = $this->getChildCategoryById($val['id'], $categoryList);
             if ($childCategory) {
                 $category[$val['id']]['child'] = $childCategory;
             }
             if ($val['parentid'] == 0) {
                 $val['child'] = $childCategory;
                 $firstCategory[$val['id']] = $val;
             }
         }
         $category[0]['child'] = $firstCategory;
     }
     $string_start = "<?php\n \$showcategory=";
     $string_process = var_export($category, TRUE);
     $string_end = ";\n?>";
     $string = $string_start . $string_process . $string_end;
     FileUtil::writeFileContent($this->cacheFile, $string);
 }
开发者ID:lzmyoyo,项目名称:ninxingfu,代码行数:25,代码来源:showCategoryModel.php

示例3: createMenuCacheFile

 public function createMenuCacheFile()
 {
     $this->dbGetAllMenu();
     $menu = $firstMenu = null;
     $menuList = $this->menuList;
     if ($menuList) {
         foreach ($menuList['resultList'] as $val) {
             $menu[$val['id']] = $val;
             $childMenu = $this->getChildMenuById($val['id'], $menuList['resultList']);
             if ($childMenu) {
                 $menu[$val['id']]['child'] = $childMenu;
             }
             if ($val['parentid'] == 0) {
                 $val['child'] = $childMenu;
                 $firstMenu[$val['id']] = $val;
             }
         }
         $menu[0]['child'] = $firstMenu;
     }
     $string_start = "<?php\n \$menu=";
     $string_process = var_export($menu, TRUE);
     $string_end = ";\n?>";
     $string = $string_start . $string_process . $string_end;
     FileUtil::writeFileContent($this->cacheFile, $string);
 }
开发者ID:lzmyoyo,项目名称:ninxingfu,代码行数:25,代码来源:adminMenuModel.php


注:本文中的FileUtil::writeFileContent方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。