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


PHP FileSystem::write_file方法代码示例

本文整理汇总了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;
 }
开发者ID:schulzp,项目名称:stamm_leo_website,代码行数:7,代码来源:activeskin.php

示例2: WriteMap

 function WriteMap()
 {
     global $Core;
     if (!empty($this->xml)) {
         FileSystem::write_file(SITEMAP_XML_FILE, $this->xml);
     }
 }
开发者ID:schulzp,项目名称:stamm_leo_website,代码行数:7,代码来源:sitemapper.class.php

示例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);
        }
    }
}
开发者ID:schulzp,项目名称:stamm_leo_website,代码行数:44,代码来源:functions.php

示例4: WriteFile

 function WriteFile($file, $str, $append = 0)
 {
     return FileSystem::write_file($file, $str, 'w+');
 }
开发者ID:schulzp,项目名称:stamm_leo_website,代码行数:4,代码来源:core.php

示例5: save

 function save()
 {
     global $Core;
     return FileSystem::write_file($this->source, $Core->xmlHandler->objsToXml($this->getData(), 'page'));
 }
开发者ID:schulzp,项目名称:stamm_leo_website,代码行数:5,代码来源:page.php


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