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


PHP FileHelper::createFile方法代码示例

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


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

示例1: foreach

 FileHelper::foldercheck($folderusersmodulestmptmpl);
 // Create files
 $modulelines = ModuleHelper::modulefile($varObject);
 $xmllines = ModuleHelper::modulexml($varObject);
 $helperlines = ModuleHelper::helperfile($varObject);
 $defaultlines = ModuleHelper::defaultfile($varObject);
 // Set filenames
 $indexfile = 'index.html';
 $modulefile = $folderusersmodulestmp . 'mod_' . $varObject->filename . '.php';
 $xmlfile = $folderusersmodulestmp . 'mod_' . $varObject->filename . '.xml';
 $helperfile = $folderusersmodulestmp . 'helper.php';
 $defaultfile = $folderusersmodulestmptmpl . 'default.php';
 $totallinescreated[] = FileHelper::createFile($modulefile, $modulelines);
 $totallinescreated[] = FileHelper::createFile($xmlfile, $xmllines);
 $totallinescreated[] = FileHelper::createFile($helperfile, $helperlines);
 $totallinescreated[] = FileHelper::createFile($defaultfile, $defaultlines);
 // Zip Files
 $filestozip[] = $modulefile;
 $filestozip[] = $xmlfile;
 $filestozip[] = $helperfile;
 $filestozip[] = $defaultfile;
 $indexlines[] = Files::indexFile();
 // Can't go into tmp directory!
 $totallinescreated[] = FileHelper::createfile($folderusersmodules . $indexfile, $indexlines);
 $indexpaths[] = $folderusersmodulestmp . $indexfile;
 $indexpaths[] = $folderusersmodulestmptmpl . $indexfile;
 // Create index files under all paths
 foreach ($indexpaths as $indexpath) {
     $totallinescreated[] = FileHelper::createfile($indexpath, $indexlines);
     $filestozip[] = $indexpath;
 }
开发者ID:calebnance,项目名称:black-rabbit-os,代码行数:31,代码来源:module-create.php

示例2: foreach

     $filestozip[] = $sqluninstallfile;
     $filestozip[] = $sqlupdatesmysqlfile;
 }
 // end - added v.0.6.0
 $filestozip[] = $helperfile;
 $filestozip[] = $languagefile;
 $filestozip[] = $languagesysfile;
 $filestozip[] = $cssfile;
 $filestozip[] = $jsfile;
 // Site files
 $totallinescreated[] = FileHelper::createFile($sitecomponentfile, $sitecomponentlines);
 $totallinescreated[] = FileHelper::createFile($sitecontrollerfile, $sitecontrollerlines);
 $totallinescreated[] = FileHelper::createFile($siterouterfile, $siterouterlines);
 $totallinescreated[] = FileHelper::createFile($sitehelperfile, $sitehelperlines);
 $totallinescreated[] = FileHelper::createFile($sitecssfile, "");
 $totallinescreated[] = FileHelper::createFile($sitejsfile, "");
 $filestozip[] = $sitecomponentfile;
 $filestozip[] = $sitecontrollerfile;
 $filestozip[] = $siterouterfile;
 $filestozip[] = $sitehelperfile;
 $filestozip[] = $sitecssfile;
 $filestozip[] = $sitejsfile;
 /**
  *	Lines created calculate
  */
 $totallinescalculated = 0;
 foreach ($totallinescreated as $totallineseach) {
     $totallinescalculated = $totallinescalculated + $totallineseach;
 }
 // 15 seconds per line - round up or down..
 $totaltimesaved = round($totallinescalculated / 4 / 60);
开发者ID:calebnance,项目名称:black-rabbit-os,代码行数:31,代码来源:create.php


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