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


PHP ReadFiletext函数代码示例

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


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

示例1: GetSettingConfig

function GetSettingConfig($string)
{
    $filename = ECMS_PATH . DASHBOARD . "/config/config.php";
    $exp = '//-------EmpireCMS.Seting.area-------';
    $text = ReadFiletext($filename);
    $r = explode($exp, $text);
    if ($r[0] == '') {
        return false;
    }
    $r[1] = $string;
    $setting = $r[0] . $exp . $r[1] . $exp . $r[2];
    WriteFiletext_n($filename, $setting);
}
开发者ID:novnan,项目名称:meiju,代码行数:13,代码来源:setfun.php

示例2: GetMemberFform

function GetMemberFform($type, $f, $fvalue, $fformsize = '')
{
    if ($type == "select" || $type == "radio" || $type == "checkbox") {
        return GetMFformSelect($type, $f, $fvalue, $fformsize);
    }
    $file = "../data/html/memberfhtml.txt";
    $data = ReadFiletext($file);
    $exp = "[!--" . $type . "--]";
    $r = explode($exp, $data);
    $string = str_replace("[!--enews.var--]", $f, $r[1]);
    $string = str_replace("[!--enews.def.val--]", $fvalue, $string);
    $string = RepMFformSize($f, $string, $type, $fformsize);
    return fAddAddsData($string);
}
开发者ID:novnan,项目名称:meiju,代码行数:14,代码来源:memberfun.php

示例3: ShowKey

function ShowKey()
{
    $key = strtolower(domake_password(4));
    $set = esetcookie("checkkey", $key);
    //是否支持gd库
    if (function_exists("imagejpeg")) {
        header("Content-type: image/jpeg");
        $img = imagecreate(69, 20);
        $black = imagecolorallocate($img, 255, 255, 255);
        $gray = imagecolorallocate($img, 102, 102, 102);
        imagefill($img, 0, 0, $gray);
        imagestring($img, 3, 14, 3, $key, $black);
        imagejpeg($img);
        imagedestroy($img);
    } elseif (function_exists("imagegif")) {
        header("Content-type: image/gif");
        $img = imagecreate(69, 20);
        $black = imagecolorallocate($img, 255, 255, 255);
        $gray = imagecolorallocate($img, 102, 102, 102);
        imagefill($img, 0, 0, $gray);
        imagestring($img, 3, 14, 3, $key, $black);
        imagegif($img);
        imagedestroy($img);
    } elseif (function_exists("imagepng")) {
        header("Content-type: image/png");
        $img = imagecreate(69, 20);
        $black = imagecolorallocate($img, 255, 255, 255);
        $gray = imagecolorallocate($img, 102, 102, 102);
        imagefill($img, 0, 0, $gray);
        imagestring($img, 3, 14, 3, $key, $black);
        imagepng($img);
        imagedestroy($img);
    } elseif (function_exists("imagewbmp")) {
        header("Content-type: image/vnd.wap.wbmp");
        $img = imagecreate(69, 20);
        $black = imagecolorallocate($img, 255, 255, 255);
        $gray = imagecolorallocate($img, 102, 102, 102);
        imagefill($img, 0, 0, $gray);
        imagestring($img, 3, 14, 3, $key, $black);
        imagewbmp($img);
        imagedestroy($img);
    } else {
        $set = esetcookie("checkkey", "ebak");
        @(include "class/functions.php");
        echo ReadFiletext("images/ebak.jpg");
    }
}
开发者ID:ailingsen,项目名称:pigcms,代码行数:47,代码来源:ShowKey.php

示例4: GetDtTempFiletext

function GetDtTempFiletext($tempid)
{
    global $empire, $dbtbpre;
    $tempid = (int) $tempid;
    if (!$tempid) {
        printerror('ErrorUrl', '');
    }
    $tempr = $empire->fetch1("select * from {$dbtbpre}enewstempdt where tempid='{$tempid}'");
    if (!$tempr['tempid']) {
        printerror('ErrorUrl', '');
    }
    $file = ECMS_PATH . $tempr['tempfile'];
    if (!file_exists($file)) {
        printerror('FileNotExist', '');
    }
    $tempr['temptext'] = ReadFiletext($file);
    return $tempr;
}
开发者ID:novnan,项目名称:meiju,代码行数:18,代码来源:EditDttemp.php

示例5: QDownLoadFile

function QDownLoadFile($file)
{
    global $public_r;
    if (strstr($file, "\\")) {
        $exp = "\\";
    } elseif (strstr($file, "/")) {
        $exp = "/";
    } else {
        Header("Location:{$file}");
        exit;
    }
    if (strstr($file, $exp . "e" . $exp) || strstr($file, "..") || strstr($file, "?") || strstr($file, "#")) {
        Header("Location:{$file}");
        exit;
    }
    $efileurl = eReturnFileUrl();
    if (strstr($file, $efileurl)) {
        $file = str_replace($efileurl, '/data/', $file);
    }
    if (!strstr($file, "://")) {
        if (!file_exists($file)) {
            $file = eReturnEcmsMainPortPath() . substr($file, 1);
        }
    }
    $filename = GetDownurlFilename($file, $exp);
    if (empty($filename)) {
        Header("Location:{$file}");
        exit;
    }
    //下载
    Header("Content-type: application/octet-stream");
    //Header("Accept-Ranges: bytes");
    //Header("Accept-Length: ".$filesize);
    Header("Content-Disposition: attachment; filename=" . $filename);
    echo ReadFiletext($file);
}
开发者ID:novnan,项目名称:meiju,代码行数:36,代码来源:DownSysFun.php

示例6: GetTxtFieldText

function GetTxtFieldText($pagetexturl)
{
    global $do_txtpath;
    if (empty($pagetexturl)) {
        return '';
    }
    $file = $do_txtpath . $pagetexturl . ".php";
    $text = ReadFiletext($file);
    $text = substr($text, 12);
    //去除exit
    return $text;
}
开发者ID:BGCX261,项目名称:zjh-dev-svn-to-git,代码行数:12,代码来源:connect.php

示例7: Ebak_RepFilenum

function Ebak_RepFilenum($p,$table,$path){
	if(empty($p))
	{$p=0;}
	$file=$path."/config.php";
	$text=ReadFiletext($file);
	$rep1="\$tb[".$table."]=0;";
	$rep2="\$tb[".$table."]=".$p.";";
	$text=str_replace($rep1,$rep2,$text);
	WriteFiletext_n($file,$text);
}
开发者ID:jinjing1989,项目名称:wei,代码行数:10,代码来源:functions.php

示例8: sys_ReadFile

function sys_ReadFile($http)
{
    global $do_openreadfile;
    if ($do_openreadfile == 0 && !strstr($http, "://")) {
        return "";
    }
    echo ReadFiletext($http);
}
开发者ID:BGCX261,项目名称:zjh-dev-svn-to-git,代码行数:8,代码来源:t_functions.php

示例9: GetQFform

function GetQFform($type, $f, $fvalue, $fformsize = '', $add)
{
    if ($type == "select" || $type == "radio" || $type == "checkbox") {
        return GetFformSelect($type, $f, $fvalue, $fformsize);
    }
    $file = "../data/html/qfhtml.txt";
    $data = ReadFiletext($file);
    //特殊字段
    if ($f == "newstext" || $f == "downpath" || $f == "onlinepath" || $f == "morepic" || $f == "playerid") {
        $type = $f;
    }
    $exp = "[!--" . $type . "--]";
    $r = explode($exp, $data);
    $string = str_replace("[!--enews.var--]", $f, $r[1]);
    $string = str_replace("[!--enews.def.val--]", $fvalue, $string);
    if ($type == 'linkfield') {
        $string = str_replace("[!--enews.cfield.var--]", $add[linkfieldval], $string);
        $string = str_replace("[!--enews.vfield.var--]", $add[linkfieldshow], $string);
        $string = str_replace("[!--enews.ctbname--]", $add[linkfieldtb], $string);
    } elseif ($type == 'linkfieldselect') {
        $selectf = $add[linkfieldval] == $add[linkfieldshow] ? $add[linkfieldval] : $add[linkfieldval] . ',' . $add[linkfieldshow];
        $string = str_replace("[!--enews.cfield.var--]", $add[linkfieldval], $string);
        $string = str_replace("[!--enews.vfield.var--]", $add[linkfieldshow], $string);
        $string = str_replace("[!--enews.ctbname--]", $add[linkfieldtb], $string);
        $string = str_replace("[!--enews.selectf--]", $selectf, $string);
    } elseif ($type == 'editor' || $type == 'newstext') {
        $editortype = $add[editorys] == 0 ? 'Default' : 'Basic';
        $string = str_replace("[!--editor.type--]", $editortype, $string);
        $string = str_replace("[!--editor.basepath--]", '', $string);
    }
    $string = RepFformSize($f, $string, $type, $fformsize);
    return addslashes($string);
}
开发者ID:BGCX261,项目名称:zjh-dev-svn-to-git,代码行数:33,代码来源:moddofun.php

示例10: LoadInTempGroup

function LoadInTempGroup($add, $file, $file_name, $file_type, $file_size, $userid, $username)
{
    global $empire, $dbtbpre;
    //验证权限
    CheckLevel($userid, $username, $classid, "tempgroup");
    if (!$file_name || !$file_size) {
        printerror("EmptyLoadInTempGroup", "");
    }
    $gid = (int) $add['gid'];
    //扩展名
    $filetype = GetFiletype($file_name);
    if ($filetype != ".temp") {
        printerror("LoadInTempGroupMusttemp", "");
    }
    //上传文件
    $path = ECMS_PATH . DASHBOARD . '/data/tmp/temp/uploadtg' . time() . make_password(10) . '.temp';
    $cp = @move_uploaded_file($file, $path);
    DoChmodFile($path);
    $data = ReadFiletext($path);
    DelFiletext($path);
    //转码
    if ($add['ChangeChar']) {
        $data = LoadInTempChangeChar($add['tempchar'], $data);
    }
    if (empty($data)) {
        printerror("EmptyLoadInTempGroup", "");
    }
    //返回版本
    $pageexp = "<!---ecms.temp--->";
    $checkpr = explode($pageexp, $data);
    $tempverr = LoadInTGReturnVer($checkpr[0]);
    $gname = $tempverr['gname'];
    $thistempver = $tempverr['ver'];
    $thistempchar = $tempverr['tempchar'];
    //替换旧地址
    $GLOBALS['loadtempver'] = $thistempver;
    if (empty($thistempver)) {
        $data = LoadInTGReptext_pubvar($data);
    }
    //入库
    $pageexp = "<!---ecms.temp--->";
    $record = "<!---ecms.record--->";
    $field = "<!---ecms.field--->";
    $pr = explode($pageexp, $data);
    if (empty($gid)) {
        $sql = $empire->query("insert into {$dbtbpre}enewstempgroup(gname,isdefault) values('" . addslashes($gname) . "',0);");
        $gid = $empire->lastid();
        $gname = $pr[0];
        $en = "_" . $gid;
        CreateTempTb($gid, $en);
        //复制表
    } else {
        $r = $empire->fetch1("select gid,gname from {$dbtbpre}enewstempgroup where gid={$gid}");
        if (!$r['gid']) {
            printerror("LoadInTempGroupMusttemp", "");
        }
        if ($gid == 1) {
            $en = "";
        } else {
            $en = "_" . $gid;
        }
        $gname = $r['gname'];
        ClearTempTb($gid, $en);
        //清空表
    }
    //版本
    $isold = 0;
    $ckcount = count($pr);
    if ($ckcount <= 10) {
        $isold = 1;
    } elseif ($ckcount <= 11) {
        $isold = 2;
    }
    LoadInTGBqtemp($gid, $en, $record, $field, $pr[1]);
    //标签模板
    LoadInTGJstemp($gid, $en, $record, $field, $pr[2]);
    //JS模板
    LoadInTGListtemp($gid, $en, $record, $field, $pr[3]);
    //列表模板
    LoadInTGNewstemp($gid, $en, $record, $field, $pr[4]);
    //内容模板
    LoadInTGPubtemp($gid, $en, $record, $field, $pr[5], $isold);
    //公共模板
    LoadInTGSearchtemp($gid, $en, $record, $field, $pr[6]);
    //搜索模板
    LoadInTGTempvar($gid, $en, $record, $field, $pr[7]);
    //模板变量
    LoadInTGVotetemp($gid, $en, $record, $field, $pr[8]);
    //投票模板
    LoadInTGClasstemp($gid, $en, $record, $field, $pr[9]);
    //栏目模板
    if ($isold != 1) {
        LoadInTGPltemp($gid, $en, $record, $field, $pr[10]);
        //评论模板
    }
    if ($isold == 0) {
        LoadInTGPrinttemp($gid, $en, $record, $field, $pr[11]);
        //打印模板
    }
    LoadInTGPagetemp($gid, $en, $record, $field, $pr[12]);
//.........这里部分代码省略.........
开发者ID:novnan,项目名称:meiju,代码行数:101,代码来源:tempfun.php

示例11: SetDisplayClass

if ($_GET['doopen']) {
    $open = (int) $_GET['open'];
    SetDisplayClass($open);
}
//图标
if (getcvar('displayclass', 1)) {
    $img = "<a href='ListClass.php?doopen=1&open=0" . $ecms_hashur['ehref'] . "' title='展开'><img src='../data/images/displaynoadd.gif' width='15' height='15' border='0'></a>";
} else {
    $img = "<a href='ListClass.php?doopen=1&open=1" . $ecms_hashur['ehref'] . "' title='收缩'><img src='../data/images/displayadd.gif' width='15' height='15' border='0'></a>";
}
//缓存
$displayclass = (int) getcvar('displayclass', 1);
$fcfile = "../data/fc/ListClass" . $displayclass . ".php";
$fclistclass = '';
if (file_exists($fcfile)) {
    $fclistclass = str_replace(AddCheckViewTempCode(), '', ReadFiletext($fcfile));
}
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>管理栏目</title>
<link rel="stylesheet" href="adminstyle/<?php 
echo $loginadminstyleid;
?>
/adminstyle.css" type="text/css">
<SCRIPT lanuage="JScript">
function turnit(ss)
{
 if (ss.style.display=="") 
开发者ID:novnan,项目名称:meiju,代码行数:31,代码来源:ListClass.php

示例12: Ebak_RepPathFiletext

function Ebak_RepPathFiletext($add)
{
    global $bakpath;
    $mypath = trim($add['mypath']);
    $oldword = Ebak_ClearAddsData($add['oldword']);
    $newword = Ebak_ClearAddsData($add['newword']);
    /* 对用于替换的内容进行危险关键字过滤 */
    if (preg_match("/([^a-zA-Z0-9_]{1,1})+(extract|parse_str|str_replace|unserialize|ob_start|require|include|array_map|preg_replace|copy|fputs|fopen|file_put_contents|file_get_contents|fwrite|eval|phpinfo|assert|base64_decode|create_function|call_user_func)+( |\\()/is", $newword)) {
        die("Request Error!");
    }
    /**/
    $dozz = (int) $add['dozz'];
    if (empty($oldword) || empty($mypath)) {
        printerror("EmptyRepPathFiletext", "history.go(-1)");
    }
    if (strstr($mypath, "..")) {
        printerror("NotChangeRepPathFiletext", "history.go(-1)");
    }
    $path = $bakpath . "/" . $mypath;
    if (!file_exists($path)) {
        printerror("PathNotExists", "history.go(-1)");
    }
    $hand = @opendir($path);
    while ($file = @readdir($hand)) {
        $filename = $path . "/" . $file;
        if ($file != "." && $file != ".." && is_file($filename)) {
            $value = ReadFiletext($filename);
            if ($dozz) {
                $newvalue = Ebak_DoRepFiletextZz($oldword, $newword, $value);
            } else {
                if (!stristr($value, $oldword)) {
                    continue;
                }
                $newvalue = str_replace($oldword, $newword, $value);
            }
            WriteFiletext_n($filename, $newvalue);
        }
    }
    printerror("RepPathFiletextSuccess", "RepFiletext.php");
}
开发者ID:ziyou-liu,项目名称:jiesi,代码行数:40,代码来源:combakfun.php

示例13: GetTxtFieldText

function GetTxtFieldText($pagetexturl)
{
    global $ecms_config;
    if (empty($pagetexturl)) {
        return '';
    }
    $file = $ecms_config['sets']['txtpath'] . $pagetexturl . ".php";
    $text = ReadFiletext($file);
    $text = substr($text, 12);
    //去除exit
    return $text;
}
开发者ID:novnan,项目名称:meiju,代码行数:12,代码来源:connect.php

示例14: baklist

 public function baklist()
 {
     $list = array();
     $db_dir = C("DB_BAKPATH");
     if (!empty($db_dir) && ($od = opendir($db_dir))) {
         while (($file = readdir($od)) !== false) {
             if ($file != "." && $file != ".." && is_dir($db_dir . "/" . $file)) {
                 $row = array();
                 $row['dirname'] = $file;
                 //备份文件夹内部文件
                 if ($od2 = opendir($db_dir . "/" . $file)) {
                     while (($file2 = readdir($od2)) !== false) {
                         preg_match('|\\.(\\w+)$|i', $file2, $ext);
                         $extend = strtolower($ext[1]);
                         //文件后缀
                         if ($file2 != "." && $file2 != ".." && !is_dir($db_dir . "/{$file}/" . $file2)) {
                             if ($extend == "txt") {
                                 $row['baktime'] = date("Y-m-d H:i:s", filemtime("{$db_dir}/{$file}/{$file2}"));
                                 $row['bakdetail'] = ReadFiletext("{$db_dir}/{$file}/{$file2}");
                             }
                             $row['baksize'] = $row['baksize'] + filesize("{$db_dir}/{$file}/{$file2}");
                         }
                     }
                 }
                 //备份文件夹内部文件
                 $list[] = $row;
             }
         }
         //while
     }
     $this->assign("baklist", $list);
     $this->display();
 }
开发者ID:hutao1004,项目名称:yintt,代码行数:33,代码来源:DbAction.class.php

示例15: GetConfig

function GetConfig($domod = 0)
{
    $filename = ECMS_PATH . "e/class/config.php";
    $exp = '//-------EmpireCMS.Public.Cache-------';
    $text = ReadFiletext($filename);
    $r = explode($exp, $text);
    if ($r[0] == '') {
        return false;
    }
    $r[1] = GetPubCache();
    if ($domod == 1) {
        $r[2] = GetModCache();
    }
    $setting = $r[0] . $exp . $r[1] . $exp . $r[2] . $exp . $r[3];
    WriteFiletext_n($filename, $setting);
}
开发者ID:BGCX261,项目名称:zjh-dev-svn-to-git,代码行数:16,代码来源:functions.php


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