• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP getFileContent函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: buildContent

function buildContent($lang)
{
    // array of file names to use
    // NOTE: the textboxes will be created and ordered in the same order of the array
    $file_list = array("narrator_box", "style_box", "script_box", "about_box");
    // array with the strings to return
    $res = array("style" => "", "script" => "");
    // loop through the file list and create the textboxes HTML
    $file_count = 0;
    foreach ($file_list as $file) {
        // grab the file's content
        $file_content = getFileContent($file, $lang);
        // skip if this file has no content
        if (empty($file_content)) {
            continue;
        }
        // run this file's content through the CSS text color coding function
        $content_aux = addStyleTags(preg_replace("/(\n|\r\n)/", "\r", $file_content));
        // store the styles
        $res["style"] .= $content_aux["style"];
        // run this file's content through the CSS text color coding function
        $content_aux = addScriptTags($content_aux["color_coded"]);
        // store the scripts
        $res["script"] .= $content_aux["script"];
        // store this file's content with color coding
        // making sure to remove any "goto" tags and any "\r" after it (to avoid having empty lines int he final result)
        $res[$file] = preg_replace("/<goto[^>]*>\r?/i", "", $content_aux["color_coded"]);
        // create this file's text box (the final html for this file)
        $res[$file] = "<div id='" . $file . "' class='content flex_item' style='order:" . $file_count++ . ";'>\n\t\t\t<div class='header header_expanded'>\n\t\t\t\t<div class='header_text'>" . strtoupper($file) . "</div>\n\t\t\t\t<div class='header_button hb_expanded'></div>\n\t\t\t</div>\n\t\t\t<div class='text text_expanded'>" . $res[$file] . "</div>\n\t\t</div>";
    }
    return $res;
}
开发者ID:PedroHenriques,项目名称:www.pedrojhenriques.com,代码行数:32,代码来源:functions.php


示例2: read

 public function read()
 {
     if (!is_file($this->fileName)) {
         return false;
     } else {
         return getFileContent($this->fileName);
     }
 }
开发者ID:laekov,项目名称:shiruku,代码行数:8,代码来源:cache.php


示例3: matchFilter

function matchFilter($filter, $content)
{
    if (isset($filter->gt)) {
        foreach ($filter->gt as $key => $val) {
            if (!isset($content->{$key}) || $content->{$key} <= $val) {
                return false;
            }
        }
    }
    if (isset($filter->lt)) {
        foreach ($filter->lt as $key => $val) {
            if (!isset($content->{$key}) || $content->{$key} >= $val) {
                return false;
            }
        }
    }
    if (isset($filter->equal)) {
        foreach ($filter->equal as $key => $val) {
            if (!isset($content->{$key}) || $content->{$key} != $val) {
                return false;
            }
        }
    }
    if (isset($filter->inArray)) {
        foreach ($filter->inArray as $key => $val) {
            if (!isset($content->{$key}) || !in_array($val, $content->{$key})) {
                return false;
            }
        }
    }
    if (isset($filter->vague)) {
        foreach ($filter->vague as $val) {
            if (is_array($content->tag) && in_array($val, $content->tag)) {
                return true;
            }
            if (strpos($content->title, $val) !== false) {
                return true;
            }
            $text = getFileContent($srkEnv->penPath . $content->penId . '/content.md');
            if (strpos($text, $val) !== false) {
                return true;
            }
        }
        return false;
    }
    return true;
}
开发者ID:laekov,项目名称:shiruku,代码行数:47,代码来源:pen.php


示例4: load

 public function load($pathName)
 {
     $this->fileName = $pathName . '/like.json';
     if (is_file($this->fileName)) {
         $this->data = json_decode(getFileContent($this->fileName));
         if ($this->data !== null) {
             if (is_object($this->data->list)) {
                 $this->data->list = (array) $this->data->list;
             }
             $this->status = 'normal';
         }
     } else {
         $this->data = (object) self::$defaultData;
         $this->status = 'normal';
     }
     return $this->status !== 'normal';
 }
开发者ID:laekov,项目名称:shiruku,代码行数:17,代码来源:like.php


示例5: commentLoadContent

function commentLoadContent($penId, $commentId)
{
    global $srkEnv;
    $contentFileName = $srkEnv->penPath . '/' . $penId . '/comment/' . $commentId . '/content.html';
    return getFileContent($contentFileName);
}
开发者ID:laekov,项目名称:shiruku,代码行数:6,代码来源:comment.php


示例6: dirname

<?php

include dirname(__FILE__) . "/../commonLib.php";
$filePath = $_GET["file_path"];
// $filePath = "/disk2/qatest/svn_code/qa/WebFramework/htdocs/m_testAssist/m_productCodeComment/code/bf3c7cfd35b54b58eb4fa83eca5a5f35/499969/build.xml";
// $filePath = "/disk2/qatest/svn_code/qa/WebFramework/htdocs/m_testAssist/m_productCodeComment/code/bf3c7cfd35b54b58eb4fa83eca5a5f35/499969/src/java/outfox/ead/stat/mongo/model/Order.java";
$retArray = getFileContent($filePath, "red");
$type = $retArray["type"];
$lines = $retArray["lines"];
$content = "";
if ($type == "image" || $type == "error") {
    $content = $lines[0];
} elseif ($type == "text") {
    $line_cnt = count($lines);
    $temp_arr = array();
    $line_idx_classname = "idx_span";
    $line_classname = "cont_span";
    $line_idx = 1;
    foreach ($lines as $arr) {
        list($line, $funcName) = $arr;
        if ($line_cnt < 10) {
            $line = sprintf("<span class='{$line_idx_classname}'>%s</span><span class='{$line_classname}'>%s</span>", $line_idx, $line);
        } elseif ($line_cnt < 100) {
            $line = sprintf("<span class='{$line_idx_classname}'>%2s</span><span class='{$line_classname}'>%s</span>", $line_idx, $line);
        } elseif ($line_cnt < 1000) {
            $line = sprintf("<span class='{$line_idx_classname}'>%2s</span><span class='{$line_classname}'>%s</span>", $line_idx, $line);
        } elseif ($line_cnt < 10000) {
            $line = sprintf("<span class='{$line_idx_classname}'>%2s</span><span class='{$line_classname}'>%s</span>", $line_idx, $line);
        }
        $line_idx++;
        array_push($temp_arr, "<div name='func_{$funcName}' class='file_line'>" . $line . "</div>");
开发者ID:sleepyycat,项目名称:WebFramework,代码行数:31,代码来源:get_file_content.php


示例7: getFileContent

    <link href="theme/<?php 
echo CONFIG_THEME_NAME;
?>
/css/ajaxtexteditor.css" type="text/css" rel="stylesheet"/>
    <link href="theme/<?php 
echo CONFIG_THEME_NAME;
?>
/css/jqModal.css" type="text/css" rel="stylesheet"/>
    <title>Ajax Text Editor</title>
</head>
<body>

<div id="pageBody">
    <textarea name="content" id="content" style="height:500px; width: 97%;"><?php 
echo getFileContent($path);
?>
</textarea>
</div>
<div id="windowProcessing" class="jqmWindow" style="display:none">
    <form name="frmProcessing" id="frmProcessing" method="post"
          action="<?php 
echo appendQueryString(CONFIG_URL_SAVE_TEXT, makeQueryString(array('path')));
?>
">
        <input type="hidden" name="folder" id="folder" value="<?php 
echo dirname($path);
?>
"/>
        <input type="hidden" name="name" id="name" value="<?php 
echo basename($path);
开发者ID:annickvdp,项目名称:Chamilo1.9.10,代码行数:30,代码来源:ajax_text_editor.php


示例8: dirname

<?php

include dirname(__FILE__) . "/../util/util.php";
echo json_encode(getFileContent($_GET["file_path"]));
开发者ID:sleepyycat,项目名称:WebFramework,代码行数:4,代码来源:get_file_content.php


示例9: makecontact_execute


//.........这里部分代码省略.........
                        session_addvalue($slot . '_info', getLT('wblank'));
                        session_setvalue($slot . "_viewid", $id);
                        setSlotView($slot, "add");
                    } else {
                        $_local_error = getLT('unableadd');
                        break;
                    }
                }
            case 'sendemail':
                if (isset($_POST['cancel_button']) && $_POST['cancel_button'] == getLT('cancel')) {
                    $_local_error = 'usercanceled';
                    break;
                }
                if ($_local_error == "") {
                    ob_start();
                    require_once "config/htmlreport.php";
                    require_once "config/templates.php";
                    require_once "config/mail.php";
                    global $_templates;
                    require_once "config/utils.php";
                    $_control_replace_sql = "parseAndReplaceAll";
                    $pdf = new HtmlReport("");
                    $emailbody = ob_get_contents();
                    ob_end_clean();
                    $emailbody = html_entity_decode($emailbody);
                    $emailsubject = getLT('emailcontact');
                    global $mails_sql_conn;
                    $mails_sql_conn = create_db_connection();
                    $mails_sql_conn->openselect($_control_replace_sql("select pemails as email from projects where id=0[config.projectid]"));
                    $noemail = false;
                    if ($mails_sql_conn->eof()) {
                        $noemail = true;
                    }
                    while (!$mails_sql_conn->eof()) {
                        $mailman = createMailObject();
                        $mailman->IsHTML(true);
                        $emailto = $mails_sql_conn->getvalue("email");
                        $emailreply = "";
                        $emailbcc = "";
                        $emailcc = "";
                        $emailfrom = "";
                        $emailbody = getFileContent(getFilePathFor('html', 'makecontact'));
                        require_once "config/utils.php";
                        $emailbody = parseAndReplaceAll($emailbody);
                        $emailreply = correctPostValue($_POST["iemail"]);
                        $mailman->Body = $emailbody;
                        $mailman->Subject = $emailsubject;
                        $mailman->ClearAddresses();
                        $mailman->AddAddress($emailto);
                        if ($emailbcc != "") {
                            $mailman->AddBCC($emailbcc);
                        }
                        if ($emailcc != "") {
                            $mailman->AddCC($emailcc);
                        }
                        if ($emailfrom != "") {
                            $mailman->FromName = "";
                            $mailman->From = $emailfrom;
                        }
                        if ($emailreply != '') {
                            $mailman->AddReplyTo($emailreply);
                        }
                        $mailman->send();
                        $mails_sql_conn->movenext();
                    }
                    $mails_sql_conn->close();
                    if ($noemail) {
                        session_addvalue($slot . '_error', getLT('noemailfound'));
                    } else {
                        session_addvalue($slot . '_info', getLT('yourmessageissent'));
                    }
                }
                break;
            default:
                //$_local_error="slot:".$slot." unknown post action: ".$action;
                setSlotView($slot, "");
                break;
        }
    }
    if (isset($_POST['cancel_button']) && $_POST['cancel_button'] == getLT('cancel')) {
        //if($_local_error!="") session_addvalue($slot.'_error',getLT($_local_error));
        $_local_error = '';
    } else {
        if ($_local_reloadform != "" || $_local_error != "" || $action == "justreloadform") {
            //save post for later use
            foreach ($_POST as $key => $val) {
                if (is_array($val)) {
                    session_setvalue('savedpost_makecontact_' . $key, correctPostValue(implode(",", str_replace(',', ' ', $_POST[$key]))));
                } else {
                    session_setvalue('savedpost_makecontact_' . $key, correctPostValue($val));
                }
            }
            if ($_local_error != "") {
                session_addvalue($slot . '_error', $_local_error);
            }
        }
    }
    $render_current_slot--;
    return $_local_error;
}
开发者ID:jawedkhan,项目名称:rorca,代码行数:101,代码来源:control_makecontact.php


示例10: getFileContent

		}
	);		

		

			
</script>

<link href="theme/<?php echo CONFIG_THEME_NAME; ?>/css/editor.css" type="text/css" rel="stylesheet" />
<link href="theme/<?php echo CONFIG_THEME_NAME; ?>/css/jqModal.css" type="text/css" rel="stylesheet" />
<title>Ajax Text Editor</title>
</head>
<body>

<div id="pageBody">
	<textarea name="content" id="content" style="height:500px; width: 97%;"><?php echo getFileContent($path); ?></textarea>
</div>
<div id="windowProcessing" class="jqmWindow" style="display:none">
	<form name="frmProcessing" id="frmProcessing" method="POST" action="<?php echo appendQueryString(CONFIG_URL_SAVE_TEXT, makeQueryString(array('path')));?>">
		<input type="hidden" name="folder" id="folder" value="<?php echo dirname($path); ?>" />
		<input type="hidden" name="name" id="name" value="<?php echo basename($path); ?>" />	
		<input type="hidden" name="save_as_request" id="save_as_request" value="0" />
		<div style="display:none"><textarea name="text" id="text"></textarea></div> 
	</form> 
	<a href="#" class="jqmClose" id="windowSaveClose"><?php echo IMG_BTN_CANCEL; ?></a>
	<p><img src="theme/<?php echo CONFIG_THEME_NAME; ?>/images/loading.gif" /></p>
</div>
<div id="windowSaveAs" class="jqmWindow" style="display:none">
    	<a href="#" class="jqmClose" id="windowSaveClose"><?php echo IMG_BTN_CANCEL; ?></a>
      <form id="formSaveAs" name="formSaveAs" action="" method="post">
    	<table class="tableForm" cellpadding="0" cellspacing="0">
开发者ID:Ting-Article,项目名称:Interview,代码行数:31,代码来源:ajax_text_editor.php


示例11: combineFile

function combineFile($filePath)
{
    global $loadedFileList, $treeContentList, $treeIndex, $contentList, $t;
    $fileContent = getFileContent($filePath);
    $loadedFileList[$filePath] = $filePath;
    $treeContentList[] = str_repeat(' | ', $treeIndex) . ' +---- ' . $filePath;
    $treeIndex++;
    foreach ($fileContent as $key => $value) {
        $matchFile = findImport($value, $t);
        if ($matchFile != '') {
            if (@$loadedFileList[$matchFile] == null) {
                combineFile($matchFile);
                $contentList[] = "\n";
            }
        } else {
            $contentList[] = $value;
        }
    }
    $treeIndex--;
}
开发者ID:AllenWeb,项目名称:my____s____i____n____a____j____s,代码行数:20,代码来源:pack_bk.php


示例12: alert

     return;
 }
 if ($check[2] !== IMAGETYPE_GIF && $check[2] !== IMAGETYPE_JPEG && $check[2] !== IMAGETYPE_PNG) {
     echo '<script language="javascript">
               alert("Image Type is not a gif/jpeg/png !!");
               window.location="' . SERVER . '/profile";
           </script>';
     return;
 }
 $filename = pathinfo($_FILES['profilepic']['name'], PATHINFO_FILENAME);
 $fileext = pathinfo($_FILES['profilepic']['name'], PATHINFO_EXTENSION);
 $image = uniqid('') . md5($filename) . '.' . $fileext;
 $file_path = $target_dir . $image;
 $fileTmpLoc = $_FILES['profilepic']['tmp_name'];
 $fileContents = hash_file('md5', $fileTmpLoc);
 $oldContent = getFileContent($sid);
 if ($fileContents == $oldContent) {
     echo '<script language="javascript">
               alert("You are trying to upload the same file!");
               window.location="' . SERVER . '/profile";
           </script>';
     return;
 }
 if ($check[2] == IMAGETYPE_JPEG) {
     $src = imagecreatefromjpeg($fileTmpLoc);
 } elseif ($check[2] == IMAGETYPE_PNG) {
     $src = imagecreatefrompng($fileTmpLoc);
 } else {
     $src = imagecreatefromgif($fileTmpLoc);
 }
 list($width, $height) = getimagesize($fileTmpLoc);
开发者ID:salehOyon,项目名称:Course-Management,代码行数:31,代码来源:editStuInfo.php


示例13: error_reporting

<?php

error_reporting(0);
// require the php file with all the custom functions
require dirname(dirname(dirname(__FILE__))) . "/code/functions.php";
// grab the file name
if (isset($_GET["fn"])) {
    $file_name = $_GET["fn"];
} else {
    // no file name was passed, so echo an empty stringe
    echo "";
    exit;
}
// grab the language
if (isset($_GET["lang"])) {
    $lang = $_GET["lang"];
} else {
    // default to english
    $lang = "EN";
}
// grab the file's content and echo it
echo getFileContent($file_name, $lang);
开发者ID:PedroHenriques,项目名称:www.pedrojhenriques.com,代码行数:22,代码来源:read_file.php


示例14: json_decode

/**
 * Is this file a shame ? Yep, totaly.
 *
 * @author Adrien Brault <[email protected]>
 */
// See http://www.apple.com/itunes/affiliates/resources/documentation/genre-mapping.html
$genresUrl = 'http://itunes.apple.com/WebObjects/MZStoreServices.woa/ws/genres';
$result = json_decode(file_get_contents($genresUrl), true);
$flatGenres = array();
foreach ($result as $genre) {
    $flatGenres = array_merge($flatGenres, getFlatGenres($genre));
}
$className = 'Genres';
$namespace = 'AdrienBrault\\ItunesClient';
$filePath = __DIR__ . '/../src/AdrienBrault/ItunesClient/Genres.php';
file_put_contents($filePath, getFileContent(filterResult($result), $flatGenres, $namespace, $className));
function getFlatGenres(array $genre, $namePrefix = '')
{
    $name = normalizeText($namePrefix . $genre['name']);
    $genres = array($name => (int) $genre['id']);
    if (isset($genre['subgenres'])) {
        foreach ($genre['subgenres'] as $subGenre) {
            $genres = array_merge($genres, getFlatGenres($subGenre, $name . '_'));
        }
    }
    return $genres;
}
function normalizeText($text)
{
    $text = strtoupper($text);
    $text = preg_replace('/[^A-Z_ ]/', '', $text);
开发者ID:adrienbrault,项目名称:itunes-client,代码行数:31,代码来源:generateGenresClass.php


示例15: sendEmailSituacionAfiliatoria

	private function sendEmailSituacionAfiliatoria($msgError) {
		global $conn;

		$emailTo = $this->datosUsuario["EMAILAVISOART"];
		$subject = "Empresa con situación afiliatoria complicada";
		$body = getFileContent($_SERVER["DOCUMENT_ROOT"]."/modules/solicitud_cotizacion/plantillas/email_situacion_afiliatoria.html");

		$params = array(":id" => $this->datosUsuario["CANAL"]);
		$sql = "SELECT ca_codigo || ' - ' || ca_descripcion FROM aca_canal WHERE ca_id = :id";
		$body = str_replace("@canal@", ValorSql($sql, "", $params, 0), $body);

		$params = array(":id" => $this->datosUsuario["ENTIDAD"]);
		$sql = "SELECT en_codbanco || ' - ' || en_nombre FROM xen_entidad WHERE en_id = :id";
		$body = str_replace("@entidad@", ValorSql($sql, "", $params, 0), $body);

		if ($_SESSION["sucursal"] != "") {
			$params = array(":id" => $this->datosUsuario["SUCURSAL"]);
			$sql = "SELECT su_codsucursal || ' - ' || su_descripcion FROM asu_sucursal WHERE su_id = :id";
			$body = str_replace("@sucursal@", ValorSql($sql, "", $params, 0), $body);
		}
		else
			$body = str_replace("@sucursal@", "", $body);

		$params = array(":id" => $this->datosSolicitud["artAnterior"]);
		$sql = "SELECT ar_nombre FROM aar_art WHERE ar_id = :id";
		$body = str_replace("@artactual@", ValorSql($sql, "", $params, 0), $body);

		$vendedor = "";
		if ($this->datosSolicitud["codigoVendedor"] != NULL) {
			$params = array(":vendedor" => IIF(($this->datosSolicitud["codigoVendedor"] == ""), "0", $this->datosSolicitud["codigoVendedor"]));
			$sql = "SELECT ve_vendedor || ' - ' || ve_nombre FROM xve_vendedor WHERE ve_vendedor = :vendedor";
			$vendedor = ValorSql($sql, "", $params, 0);
		}
		elseif ($this->datosUsuario["VENDEDOR"] == "") {
			$params = array(":identidad" => $this->datosUsuario["ENTIDAD"]);
			$sql =
				"SELECT ve_vendedor || ' - ' || ve_nombre
					 FROM xev_entidadvendedor, xve_vendedor
					WHERE ve_id = ev_idvendedor
						AND ev_fechabaja IS NULL
						AND ve_fechabaja IS NULL
						AND ve_vendedor = '0'
						AND ev_identidad = :identidad";
			$vendedor = ValorSql($sql, "", $params, 0);
		}
		$body = str_replace("@codigovendedor@", $vendedor, $body);

		$params = array(":codigo" => $this->datosSolicitud["statusBcra"]);
		$sql = "SELECT tb_descripcion FROM ctb_tablas WHERE tb_clave = 'STBCR' AND tb_codigo = :codigo";
		$body = str_replace("@statusbcra@", ValorSql($sql, "", $params, 0), $body);

		$params = array(":codigo" => $this->datosSolicitud["statusSrt"]);
		$sql = "SELECT tb_descripcion FROM ctb_tablas WHERE tb_clave = 'STSRT' AND tb_codigo = :codigo";
		$body = str_replace("@statussrt@", ValorSql($sql, "", $params, 0), $body);

		$body = str_replace("@cantidadestablecimientos@", $this->datosSolicitud["cantidadEstablecimientos"], $body);
		$body = str_replace("@ciiu1@", $this->getCodigoActividad($this->datosSolicitud["ciiu1"]), $body);
		$body = str_replace("@contacto@", $this->datosSolicitud["contacto"], $body);
		$body = str_replace("@cuit@", $this->datosSolicitud["cuit"], $body);
		$body = str_replace("@edadpromedio@", $this->datosSolicitud["edadPromedio"], $body);
		$body = str_replace("@email@", $this->datosSolicitud["email"], $body);
		$body = str_replace("@emailComercializador@", $this->datosUsuario["EMAIL"], $body);
		$body = str_replace("@error@", $msgError, $body);
		$body = str_replace("@masasalarial1@", $this->datosSolicitud["masaSalarial1"], $body);
		$body = str_replace("@periodo@", $this->datosSolicitud["periodo"], $body);
		$body = str_replace("@razonsocial@", $this->datosSolicitud["razonSocial"], $body);
		$body = str_replace("@resultadomensualtrabajador@", $this->getResultadoMensualPorTrabajador(), $body);
		$body = str_replace("@sector@", $this->datosSolicitud["sector"], $body);
		$body = str_replace("@sumafija@", $this->datosSolicitud["calculoSumaFija"], $body);
		$body = str_replace("@telefono@", $this->datosSolicitud["telefono"], $body);
		$body = str_replace("@trabajadores1@", $this->datosSolicitud["totalTrabajadores1"], $body);
		$body = str_replace("@usuario@", $this->datosUsuario["USUARIO"], $body);
		$body = str_replace("@variable@", $this->datosSolicitud["calculoVariable"], $body);

		// Agrego los datos del CIIU 2..
		$str = "";
		if ($this->datosSolicitud["ciiu2"] != "") {
			$str.= "Cod. CIIU (2): ".$this->getCodigoActividad($this->datosSolicitud["ciiu2"])."<br />";
			$str.= "Cant. Trabajadores (2): ".$this->datosSolicitud["totalTrabajadores2"]."<br />";
			$str.= "Masa Salarial (2): ".$this->datosSolicitud["masaSalarial2"]."<br />";
		}
		$body = str_replace("@ciiu2@", $str, $body);

		// Agrego los datos del CIIU 3..
		$str = "";
		if ($this->datosSolicitud["ciiu3"] != "") {
			$str.= "Cod. CIIU (3): ".$this->getCodigoActividad($this->datosSolicitud["ciiu3"])."<br />";
			$str.= "Cant. Trabajadores (3): ".$this->datosSolicitud["totalTrabajadores3"]."<br />";
			$str.= "Masa Salarial (3): ".$this->datosSolicitud["masaSalarial3"]."<br />";
		}
		$body = str_replace("@ciiu3@", $str, $body);

		// Agrego los datos de la competencia..
		$str = "";
		switch ($this->datosSolicitud["datosCompetencia"]) {
			case "":
				$str = "Sin Dato<br />";
				break;
			case "A":
				$str = "Solo pago total mensual: ".$this->datosSolicitud["soloPagoTotalMensual"]."<br />";
//.........这里部分代码省略.........
开发者ID:javierlov,项目名称:FuentesWeb,代码行数:101,代码来源:solicitud_cotizacion.php


示例16: register

 public function register($id, $data)
 {
     global $srkEnv;
     $this->id = $id;
     if ($data['passwd'] != $data['repeatPasswd']) {
         return (object) array('res' => 'Passwords do not match', 'field' => 'passwd');
     }
     foreach (UserData::$matchExp as $key => $exp) {
         if (preg_match($exp, $data[$key]) == 0) {
             $errText = 'Invalid ' . $key . '(regular exp: ' . $exp . ')';
             return (object) array('res' => $errText, 'field' => $key);
         } else {
             $this->data->{$key} = $data[$key];
         }
     }
     if (is_dir($srkEnv->userPath . '/' . $id)) {
         return (object) array('res' => 'User exists', 'field' => 'userId');
     }
     if (is_file(self::getEmailFileName($data['email']))) {
         return (object) array('res' => 'Email exists', 'field' => 'email');
     }
     $invitecodeFileName = $srkEnv->userPath . '/invite_' . $data['invitecode'] . '.json';
     if (!is_file($invitecodeFileName)) {
         return (object) array('res' => 'Invalid invite code', 'field' => 'invitecode');
     }
     $inviteCode = json_decode(getFileContent($invitecodeFileName));
     if ($inviteCode->used !== false) {
         return (object) array('res' => 'Illegal invite code', 'field' => 'invitecode');
     }
     $this->data->registerTime = time();
     $this->data->source = 'local';
     $this->status = 'registered';
     return (object) array('res' => false);
 }
开发者ID:laekov,项目名称:shiruku,代码行数:34,代码来源:user.php


示例17: elseif

 } elseif ($srkEnv->reqURLLength == 4) {
     $penId = $srkEnv->reqURL[4];
     if (!is_dir($srkEnv->penPath . '/' . $penId)) {
         srkSend(array('error' => 'No such pen'));
     } elseif ($srkEnv->reqURL[3] == 'content') {
         $content = getFileContent($srkEnv->penPath . '/' . $penId . '/content.md');
         if ($content === -1) {
             $content = 'No pen content';
         }
         srkSend(array('content' => $content));
     } elseif ($srkEnv->reqURL[3] == 'preview') {
         $config = penConfigLoad($penId);
         if ($config->catalog == 'code') {
             $content = 'Code';
         } else {
             $content = getFileContent($srkEnv->penPath . '/' . $penId . '/content.md');
         }
         if ($content === -1) {
             $content = 'No pen preview';
         } else {
             $pos = strpos($content, "\n");
             if (!$pos) {
                 $pos = strpos($content, "\r\n");
             }
             if ($pos != false) {
                 $content = substr($content, 0, $pos);
                 $content .= "<br/>...";
             }
         }
         srkSend(array('content' => $content, 'penId' => $penId));
     } elseif ($srkEnv->reqURL[3] == 'config') {
开发者ID:laekov,项目名称:shiruku,代码行数:31,代码来源:pen.php


示例18: randId

        $penId = '';
        do {
            $penId = randId(6);
        } while (is_dir($srkEnv->penPath . '/' . $penId));
        srkSend((object) array('id' => $penId));
    }
} elseif ($srkEnv->reqURL[2] == 'invite') {
    if (!in_array('invite', $user->getField("accessList"))) {
        srkSend((object) array('error' => 'Access denied'));
    } elseif ($srkEnv->reqURLLength == 3 && $srkEnv->reqURL[3] == 'query') {
        $res = array();
        $fileList = getDirCatalog($srkEnv->userPath);
        foreach ($fileList as $item) {
            if (substr($item, 0, 7) == 'invite_') {
                $inviteCode = substr($item, 7, -5);
                $inviteObj = json_decode(getFileContent($srkEnv->userPath . '/' . $item));
                $inviteObj->value = $inviteCode;
                array_push($res, $inviteObj);
            }
        }
        srkSend((object) array('list' => $res));
    } elseif ($srkEnv->reqURLLength == 4 && $srkEnv->reqURL[3] == 'generate') {
        $count = (int) $srkEnv->reqURL[4];
        $defInfo = (object) array('used' => false);
        if ($count > 0 && $count < 16) {
            for ($i = 0; $i < $count; ++$i) {
                $code = '';
                do {
                    $code = randId(16);
                } while (is_file($srkEnv->userPath . '/invite_' . $code . '.json'));
                $codeFileName = $srkEnv->userPath . '/invite_' . $code . '.json';
开发者ID:laekov,项目名称:shiruku,代码行数:31,代码来源:admin.php


示例19: getFileContent

 * Contributors:
 *     Gallouin Arthur
 */
include '../vendor/autoload.php';
/**
 *
 * getFileContent function
 * function used to download the blob of a file, converted into a PDF file
 * @param String $path contains the path of th file holding the blob
 */
function getFileContent($path = '/default-domain/workspaces/jkjkj/teezeareate.1304515647395')
{
    $eurl = explode("/", $path);
    $temp = str_replace(" ", "", end($eurl));
    $client = new \Nuxeo\Automation\Client\NuxeoPhpAutomationClient('http://localhost:8080/nuxeo/site/automation');
    $session = $client->getSession('Administrator', 'Administrator');
    $answer = $session->newRequest("Blob.Get")->set('input', 'doc:' . $path)->sendRequest();
    if (!isset($answer) or $answer == false) {
        echo '$answer is not set';
    } else {
        header('Content-Description: File Transfer');
        header('Content-Type: application/octet-stream');
        header('Content-Disposition: attachment; filename=' . $temp . '.pdf');
        readfile('tempstream');
    }
}
if (!isset($_POST['data']) or empty($_POST['data'])) {
    echo 'error';
} else {
    getFileContent($_POST['data']);
}
开发者ID:gourioua,项目名称:nuxeo-automation-php-client,代码行数:31,代码来源:B5bis.php


示例20: count

     $q = $connect->query("select count(*) from shortcircuit_each_info");
     $q = $q->fetch_assoc();
     $q = intval($q['count(*)']) + 1;
     $hash = md5($q + 2500 . 'apple');
     $connect->query("insert into shortcircuit_each_info(hash,info,update_data) values ('{$hash}','{}','{}')");
     print json_encode(array('id' => $hash));
     die;
 } else {
     if ($_GET['type'] == 'update_each_info') {
         $hash = getHashStorage();
         if ($hash == "-1") {
             die("-1");
         }
         var_dump(json_decode($_GET['data'], true));
         if ($data = json_decode($_GET['data'], true)) {
             getFileContent('./data/structure.json');
             $clustering = $content;
             $data['_color'] = array();
             $i = 0;
             foreach ($data as $key => $value) {
                 $i++;
                 foreach ($clustering['setup'] as $eachCluster) {
                     if ($eachCluster['name'] == $key) {
                         if ($eachCluster['type'] == 'choice') {
                             for ($j = 0; $j < count($eachCluster['choice']); $j++) {
                                 if ($eachCluster['choice'][$j]['value'] == $value) {
                                     $data["_color"][md5($key)] = getColor($j + $i * 2);
                                     break;
                                 }
                             }
                         }
开发者ID:neungkl,项目名称:short-circuit,代码行数:31,代码来源:flow.php



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP getFileContents函数代码示例发布时间:2022-05-15
下一篇:
PHP getFile函数代码示例发布时间:2022-05-15
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap