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


PHP fileRead函数代码示例

本文整理汇总了PHP中fileRead函数的典型用法代码示例。如果您正苦于以下问题:PHP fileRead函数的具体用法?PHP fileRead怎么用?PHP fileRead使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


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

示例1: getViewHtml

 private static function getViewHtml()
 {
     if (!file_exists(self::getView())) {
         throw new Exception("Could not find the view " . self::$view);
         //return;
     }
     return fileRead(kEvent::getView(), false);
 }
开发者ID:jamieruntime,项目名称:Potassium-Framework,代码行数:8,代码来源:event.php

示例2: gobad

function gobad($w)
{
    global $tsMySqlCache;
    $code = fileRead('data/plugins_pubs_gobad.php');
    if ($code == '') {
        $code = $tsMySqlCache->get('plugins_pubs_gobad');
    }
    echo stripslashes($code[$w]);
}
开发者ID:zhangzhengyu,项目名称:ThinkSAAS,代码行数:9,代码来源:gobad.php

示例3: gonggao

function gonggao()
{
    global $tsMySqlCache;
    $strGonggao = fileRead('data/plugins_pubs_gogngao.php');
    if ($strGonggao == '') {
        $strGonggao = $tsMySqlCache->get('plugins_pubs_gonggao');
    }
    echo '<div class="gonggao">公告:<a target="_blank" href="' . $strGonggao['url'] . '">' . $strGonggao['title'] . '</a></div>';
}
开发者ID:zhangzhengyu,项目名称:ThinkSAAS,代码行数:9,代码来源:gonggao.php

示例4: readFromFile

 private function readFromFile($filename)
 {
     if (file_exists($filename)) {
         // 			$content = file_get_contents($filename);
         $content = fileRead($filename);
         return unserialize($content);
     } else {
         return false;
     }
 }
开发者ID:Shulyakovskiy,项目名称:dvijok,代码行数:10,代码来源:dvipcfiles.php

示例5: feedback_html

function feedback_html()
{
    global $tsMySqlCache;
    $code = fileRead('data/plugins_pubs_feedback.php');
    if ($code == '') {
        $code = $tsMySqlCache->get('plugins_pubs_feedback');
    }
    echo '<div class="feedback-box">
' . stripslashes($code) . '
</div>';
}
开发者ID:zhangzhengyu,项目名称:ThinkSAAS,代码行数:11,代码来源:feedback.php

示例6: navs_html

function navs_html()
{
    global $tsMySqlCache;
    $arrNav = fileRead('data/plugins_pubs_navs.php');
    if ($arrNav == '') {
        $arrNav = $tsMySqlCache->get('plugins_pubs_navs');
    }
    foreach ($arrNav as $item) {
        echo '<li class="mainlevel"><a href="' . $item['navurl'] . '">' . $item['navname'] . '</a></li>';
    }
}
开发者ID:zhangzhengyu,项目名称:ThinkSAAS,代码行数:11,代码来源:navs.php

示例7: counter_html

function counter_html()
{
    global $tsMySqlCache;
    $code = fileRead('data/plugins_pubs_counter.php');
    if ($code == '') {
        $code = $tsMySqlCache->get('plugins_pubs_counter');
    }
    $code = stripslashes($code);
    echo '<div style="display:none;">';
    echo $code;
    echo '</div>';
}
开发者ID:zhangzhengyu,项目名称:ThinkSAAS,代码行数:12,代码来源:counter.php

示例8: postMail

 function postMail($sendmail, $subject, $content)
 {
     global $TS_SITE, $tsMySqlCache;
     $options = fileRead('data/mail_options.php');
     if ($options == '') {
         $options = $tsMySqlCache->get('mail_options');
     }
     date_default_timezone_set('Asia/Shanghai');
     require_once 'PHPMailer/PHPMailerAutoload.php';
     $mail = new PHPMailer();
     //邮件配置
     $mail->CharSet = "UTF-8";
     $mail->IsSMTP();
     //Enable SMTP debugging
     // 0 = off (for production use)
     // 1 = client messages
     // 2 = client and server messages
     $mail->SMTPDebug = 0;
     $mail->Debugoutput = 'html';
     if ($options['ssl']) {
         $mail->SMTPSecure = 'ssl';
     }
     $mail->SMTPAuth = true;
     $mail->Host = $options['mailhost'];
     $mail->Port = $options['mailport'];
     $mail->Username = $options['mailuser'];
     $mail->Password = $options['mailpwd'];
     //POST过来的信息
     $frommail = $options['mailuser'];
     $fromname = $TS_SITE['site_title'];
     $replymail = $options['mailuser'];
     $replyname = $TS_SITE['site_title'];
     $sendname = '';
     if (empty($frommail) || empty($subject) || empty($content) || empty($sendmail)) {
         return '0';
     } else {
         //邮件发送
         $mail->SetFrom($frommail, $fromname);
         $mail->AddReplyTo($replymail, $replyname);
         $mail->Subject = $subject;
         $mail->AltBody = "要查看邮件,请使用HTML兼容的电子邮件阅读器!";
         //$mail->MsgHTML(eregi_replace("[\]",'',$content));
         $mail->MsgHTML(strtr($content, '[\\]', ''));
         $mail->AddAddress($sendmail, $sendname);
         $mail->send();
         return '1';
     }
 }
开发者ID:zhangzhengyu,项目名称:ThinkSAAS,代码行数:48,代码来源:class.mail.php

示例9: links_html

function links_html()
{
    global $tsMySqlCache;
    $arrLink = fileRead('data/plugins_home_links.php');
    if ($arrLink == '') {
        $arrLink = $tsMySqlCache->get('plugins_home_links');
    }
    echo '<div class="clear"></div>';
    echo '<div class="panel panel-default">';
    echo '<div class="panel-heading">友情链接</div>';
    echo '<div class="panel-body links">';
    foreach ($arrLink as $item) {
        echo '<a class="btn btn-link" target="_blank" href="' . $item['linkurl'] . '">' . $item['linkname'] . '</a> ';
    }
    echo '</div></div>';
}
开发者ID:zwkuang,项目名称:ThinkSAAS,代码行数:16,代码来源:links.php

示例10: links_html

function links_html()
{
    global $tsMySqlCache;
    $arrLink = fileRead('data/plugins_home_links.php');
    if ($arrLink == '') {
        $arrLink = $tsMySqlCache->get('plugins_home_links');
    }
    echo '<div class="clear"></div>';
    echo '<div class="bs"><div class="bbox">';
    echo '<div class="btitle">合作夥伴</div>';
    echo '<div class="bc links">';
    foreach ($arrLink as $item) {
        echo '<a target="_blank" href="' . $item['linkurl'] . '">' . $item['linkname'] . '</a> ';
    }
    echo '</div></div></div>';
}
开发者ID:994837457,项目名称:BreakNgThinksaas,代码行数:16,代码来源:links.php

示例11: wordad

function wordad()
{
    global $tsMySqlCache;
    echo '<style>
	.wordad{ overflow:hidden;background: none repeat scroll 0 0 #EAEAEA;border: 1px solid #DDDDDD;margin-bottom: 10px;overflow: hidden;padding:5px;}
	.wordad ul{}
	.wordad ul li{width:225px;float:left;margin:2px 5px;}
	</style>';
    $arrData = fileRead('data/plugins_pubs_wordad.php');
    if ($arrData == '') {
        $arrData = $tsMySqlCache->get('plugins_pubs_wordad');
    }
    echo '<div class="wordad"><ul>';
    foreach ($arrData as $key => $item) {
        echo '<li><a rel="nofollow" target="_blank" href="' . $item['url'] . '">' . $item['title'] . '</a></li>';
    }
    echo '</ul><div class="clear"></div></div>';
}
开发者ID:zhangzhengyu,项目名称:ThinkSAAS,代码行数:18,代码来源:wordad.php

示例12: __construct

 public function __construct()
 {
     global $tsMySqlCache;
     $this->error = new ErrorCase();
     //-------读取配置文件
     //$incFileContents = file_get_contents(ROOT."comm/inc.php");
     $arrQQ = fileRead('data/plugins_pubs_qq.php');
     if ($arrQQ == '') {
         $arrQQ = $tsMySqlCache->get('plugins_pubs_qq');
     }
     $callback = urlencode($arrQQ['siteurl'] . 'index.php?app=pubs&ac=plugin&plugin=qq&in=callback');
     $incFileContents = '{"appid":"' . $arrQQ['appid'] . '","appkey":"' . $arrQQ['appkey'] . '","callback":"' . $callback . '","scope":"get_user_info,add_share,list_album,add_album,upload_pic,add_topic,add_one_blog,add_weibo,check_page_fans,add_t,add_pic_t,del_t,get_repost_list,get_info,get_other_info,get_fanslist,get_idolist,add_idol,del_idol,get_tenpay_addr","errorReport":true,"storageType":"file","host":"localhost","user":"root","password":"root","database":"test"}';
     $this->inc = json_decode($incFileContents);
     if (empty($this->inc)) {
         $this->error->showError("20001");
     }
     if (empty($_SESSION['QC_userData'])) {
         self::$data = array();
     } else {
         self::$data = $_SESSION['QC_userData'];
     }
 }
开发者ID:zhangzhengyu,项目名称:ThinkSAAS,代码行数:22,代码来源:Recorder.class.php

示例13: getRole

 public function getRole($score)
 {
     global $tsMySqlCache;
     $arrRole = fileRead('data/user_role.php');
     if ($arrRole == '') {
         $arrRole = $tsMySqlCache->get('user_role');
     }
     foreach ($arrRole as $key => $item) {
         if ($score > $item['score_start'] && $score <= $item['score_end'] || $score > $item['score_start'] && $item['score_end'] == 0 || $score >= 0 && $score <= $item['score_end']) {
             return $item['rolename'];
         }
     }
 }
开发者ID:omusico,项目名称:ThinkSAAS,代码行数:13,代码来源:class.user.php

示例14: fileRead

$savePos8 = $_POST['savePos8'];
$aaPos8 = $_POST['aaPos8'];
$saveOutput = $_POST['saveOutput'];
$saveOutputAm = $_POST['saveOutputAm'];
$Active = fileRead("Data/Active.illuminati");
if (!($newRecipe == NULL)) {
    folderCreate("Data/" . $newRecipe . "");
    fileCreate("Data/" . $newRecipe . "/ItemID.illuminati");
    fileCreate("Data/" . $newRecipe . "/ItemAm.illuminati");
    fileCreate("Data/" . $newRecipe . "/case.illuminati");
    fileCreate("Data/" . $newRecipe . "/if.illuminati");
}
if (!($loadRecipe == NULL)) {
    fileRewrite("Data/Active.illuminati", $loadRecipe);
}
$caseoutput = fileRead("Data/" . $Active . "/case.illuminati");
//Yeah, looks stupid, right?
//Going to fix it, so I dont get headaches, figuring out why did I do that :D
if (!($savePos0 == NULL) && !($aaPos0 == NULL)) {
    if ($aaPos0 == 0) {
        fileAppend("Data/" . $Active . "/if.illuminati", "craftSlotId3[0] == " . $savePos0 . "");
        fileRewrite("Data/" . $Active . "/case.illuminati", $caseoutput + $savePos0);
    } else {
        fileAppend("Data/" . $Active . "/if.illuminati", " && craftSlotId3[0] == " . $savePos0 . "");
        fileRewrite("Data/" . $Active . "/case.illuminati", $caseoutput + $savePos0);
    }
}
if (!($savePos1 == NULL) && !($aaPos1 == NULL)) {
    if ($aaPos1 == 0) {
        fileAppend("Data/" . $Active . "/if.illuminati", "craftSlotId3[1] == " . $savePos1 . "");
        fileRewrite("Data/" . $Active . "/case.illuminati", $caseoutput + $savePos1);
开发者ID:michal5575,项目名称:RecipeCodeGenerator,代码行数:31,代码来源:HandleRequests.php

示例15: defined

<?php

defined('IN_TS') or die('Access Denied.');
$arrDouban = fileRead('data/plugins_pubs_douban.php');
if ($arrDouban == '') {
    $arrDouban = $tsMySqlCache->get('plugins_pubs_douban');
}
define('KEY', $arrDouban['key']);
define('SECRET', $arrDouban['secret']);
define('REDIRECT', $TS_SITE['link_url'] . 'index.php?app=pubs&ac=plugin&plugin=douban&in=callback');
define('SCOPE', 'douban_basic_common,book_basic_r,book_basic_w');
define('STATE', 'Something');
开发者ID:zhangzhengyu,项目名称:ThinkSAAS,代码行数:12,代码来源:config.php


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