本文整理汇总了PHP中FileSystem::write_file方法的典型用法代码示例。如果您正苦于以下问题:PHP FileSystem::write_file方法的具体用法?PHP FileSystem::write_file怎么用?PHP FileSystem::write_file使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类FileSystem
的用法示例。
在下文中一共展示了FileSystem::write_file方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: save
function save()
{
global $Core;
$result = FileSystem::write_file($this->source, $Core->xmlHandler->objsToXml($this->getData(), 'activeskin'));
$this->index();
return $result;
}
示例2: WriteMap
function WriteMap()
{
global $Core;
if (!empty($this->xml)) {
FileSystem::write_file(SITEMAP_XML_FILE, $this->xml);
}
}
示例3: handle_contact_form
function handle_contact_form($mailto)
{
global $Core;
global $Filter;
$form = array();
$form['name'] = $Filter->get($_POST, 'name', '');
$form['email'] = $Filter->get($_POST, 'email', '');
$form['subject'] = $Filter->get($_POST, 'subject', '');
$form['message'] = $Filter->get($_POST, 'message', '');
$form['cc'] = $Filter->get($_POST, 'cc', FALSE);
$form['mailinglist'] = $Filter->get($_POST, 'mailinglist', 0);
$errors = array();
foreach ($form as $k => $v) {
if ($v == '') {
array_push($errors, $k);
}
}
if (count($errors)) {
set_message('error', 'Ihre Nachricht kann nicht versandt werden.<br />Bitte fuellen Sie folgende Felder aus:', implode(', ', $errors));
} else {
$headers = "MIME-Version: 1.0\n";
$headers .= "Content-type: text/plain; charset=utf-8\n";
$headers .= "From: " . $form['name'] . " <" . $form['email'] . ">\n";
$headers .= "Reply-To: <" . $form['email'] . ">\n";
$headers .= "X-Priority: 3\n";
$headers .= "X-MSMail-Priority: Low\n";
$headers .= "X-Mailer: WebServer\n";
$txtvers = date('d M\\, Y l h:i:s A') . "\n\n";
$txtvers .= 'To: ' . $mailto . "\n";
$txtvers .= 'From: ' . $form['name'] . "\n";
$txtvers .= 'Email: ' . $form['email'] . "\n\n";
$txtvers .= 'Subject: ' . $form['subject'] . "\n\n";
$txtvers .= $form['message'] . "\n";
FileSystem::write_file('data/email/~' . $form['email'] . '.' . time() . '.txt', $txtvers);
if (bashMail($form['subject'], $txtvers, $mailto, $headers)) {
set_message('Erfolg', 'Ihre Nachricht wurde versandt.', 'Wir melden uns in Kuerze.');
} else {
set_message('Fehler', 'Ihre Nachricht konnte nicht versandt werden.', 'Ein Fehler ist aufgetreten.');
}
if ($form['mailinglist'] == '1') {
bashMail('Mailing List', $form['name'] . " (" . $form['email'] . ") Moechte den Newsletter erhalten\n", $mailto, $headers);
}
}
}
示例4: WriteFile
function WriteFile($file, $str, $append = 0)
{
return FileSystem::write_file($file, $str, 'w+');
}
示例5: save
function save()
{
global $Core;
return FileSystem::write_file($this->source, $Core->xmlHandler->objsToXml($this->getData(), 'page'));
}