本文整理汇总了PHP中gpFiles::SaveFile方法的典型用法代码示例。如果您正苦于以下问题:PHP gpFiles::SaveFile方法的具体用法?PHP gpFiles::SaveFile怎么用?PHP gpFiles::SaveFile使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类gpFiles
的用法示例。
在下文中一共展示了gpFiles::SaveFile方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: Install_DataFiles_New
//.........这里部分代码省略.........
<ul>
<li>True WYSIWYG (Using CKEditor)</li>
<li>Galleries (Using ColorBox)</li>
<li>SEO Friendly Links</li>
<li>Free and Open Source (GPL)</li>
<li>Runs on PHP</li>
<li>File Upload Manager</li>
<li>Drag \'n Drop Theme Content</li>
<li>Deleted File Trash Can</li>
<li>Multiple User Administration</li>
<li>Flat File Storage</li>
<li>Fast Page Loading</li>
<li>Fast and Easy Installation</li>
<li>reCaptcha for Contact Form</li>
<li>HTML Tidy (when available)</li>
</ul>
<h2>If You Like gpEasy...</h2>
<p>If you like gpEasy, then you might also like:</p>
<ul>
<li><a href="http://phpeasymin.com" title="Minimize JavaScript and CSS files easily">phpEasyMin.com</a> - Minimize multiple JavaScript and CSS files in one sweep.</li>
</ul>');
//Side_Menu
$file = $destination . '/data/_extra/Side_Menu.php';
$content = '<h3>Join the gpEasy Community</h3>
<p>Visit gpEasy.com to access the many <a href="http://gpeasy.com/Special_Resources" title="gpEasy Community Resources">available resources</a> to help you get the most out of our CMS.</p>
<ul>
<li><a href="http://gpeasy.com/Special_Addon_Themes" title="gpEasy CMS Themes">Download Themes</a></li>
<li><a href="http://gpeasy.com/Special_Addon_Plugins" title="gpEasy CMS Plugin">Download Plugins</a></li>
<li><a href="http://gpeasy.com/Special_Forum" title="gpEasy CMS Forum">Get Help in the Forum</a></li>
<li><a href="http://gpeasy.com/Special_Powered_by" title="Sites using gpEasy CMS">Show off Your Site</a></li>
<li><a href="http://gpeasy.com/Special_Resources" title="gpEasy Community Resources">And Much More...</a></li>
</ul>
<p class="sm">(Edit this content by clicking "Edit", it's that easy!)</p>';
gpFiles::SaveFile($file, $content);
//Header
$file = $destination . '/data/_extra/Header.php';
$contents = '<h1>' . Install_Tools::Install_Link('', $config['title']) . '</h1>';
$contents .= '<h4>' . 'The Fast and Easy CMS' . '</h4>';
gpFiles::SaveFile($file, $contents);
//Footer
$file = $destination . '/data/_extra/Footer.php';
$content = '<h3><a href="http://gpeasy.com/Our_CMS" title="Features of Our CMS">gpEasy CMS Features</a></h3>
<p>Easy to use True WYSIWYG Editing.</p>
<p>Flat-file data storage and advanced resource management for fast websites.</p>
<p>Community driven development</p>
<p><a href="http://gpeasy.com/Our_CMS" title="Features of Our CMS">And More...</a></p>
<p>If you like gpEasy, then you might also like <a href="http://phpeasymin.com" title="Minimize JavaScript and CSS files easily">phpEasyMin.com</a></p>
';
gpFiles::SaveFile($file, $content);
//contact html
$file = $destination . '/data/_extra/Contact.php';
gpFiles::SaveFile($file, '<h2>Contact Us</h2><p>Use the form below to contact us, and be sure to enter a valid email address if you want to hear back from us.</p>');
// gp_index
$new_index = array();
$new_index['Home'] = 'a';
$new_index['Help_Videos'] = 'b';
$new_index['Child_Page'] = 'c';
$new_index['About'] = 'd';
$new_index['Contact'] = 'special_contact';
$new_index['Site_Map'] = 'special_site_map';
$new_index['Galleries'] = 'special_galleries';
$new_index['Missing'] = 'special_missing';
// gpmenu
$new_menu = array();
$new_menu['a'] = array('level' => 0);
$new_menu['b'] = array('level' => 0);
示例2: NewExtraArea
function NewExtraArea()
{
global $dataDir, $langmessage;
if (empty($_POST['extra_area'])) {
return false;
}
$extra_name = gp_edit::CleanTitle($_POST['extra_area']);
$extra_file = $dataDir . '/data/_extra/' . $extra_name . '.php';
if (file_exists($extra_file)) {
return $extra_name;
}
$text = '<div>' . htmlspecialchars($_POST['extra_area']) . '</div>';
if (!gpFiles::SaveFile($extra_file, $text)) {
return false;
}
return $extra_name;
}
示例3: SaveExtra
/**
* Save the posted content for an extra content area
*
*/
function SaveExtra()
{
global $langmessage, $page;
//for ajax responses
$page->ajaxReplace = array();
if (empty($_REQUEST['file'])) {
message($langmessage['OOPS']);
return false;
}
$title = gp_edit::CleanTitle($_REQUEST['file']);
$file = $this->folder . '/' . $title . '.php';
$text =& $_POST['gpcontent'];
gpFiles::cleanText($text);
if (!gpFiles::SaveFile($file, $text)) {
message($langmessage['OOPS']);
$this->EditExtra();
return false;
}
$page->ajaxReplace[] = array('ck_saved', '', '');
message($langmessage['SAVED']);
$this->areas[$title] = $title;
return true;
}