ThinkPHP/Library/Vendor/TemplateLite/class.config.php
(开头部分) 4KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
<?php
/*
* Project: template_lite, a smarter template engine
* File: class.config.php
* Author: Paul Lockaby <paul@paullockaby.com>, Mark Dickenson <akapanamajack@sourceforge.net>
* Copyright: 2003,2004,2005 by Paul Lockaby, 2005,2006 Mark Dickenson
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
* The latest version of template_lite can be obtained from:
* http://templatelite.sourceforge.net
*
*/
class config {
var $overwrite = false; // overwrite variables of the same name? if false, an array will be created
var $booleanize = true; // turn true/false, yes/no, on/off, into 1/0
var $fix_new_lines = true; // turns \r\n into \n?
var $read_hidden = true; // read hidden sections?
var $_db_qstr_regexp = null;
var $_bool_true_regexp = null;
var $_bool_false_regexp = null;
var $_qstr_regexp = null;
function config()
{
$this->_db_qstr_regexp = '"[^"\\\\]*(?:\\\\.[^"\\\\]*)*"';
$this->_bool_true_regexp = 'true|yes|on';
$this->_bool_false_regexp = 'false|no|off';
$this->_qstr_regexp = '(?:' . $this->_db_qstr_regexp . '|' . $this->_bool_true_regexp . '|' . $this->_bool_false_regexp . ')';
}
function config_load($file, $section_name = null, $var_name = null)
{
$_result = array();
$contents = file_get_contents($file);
if (empty($contents))
{
die("Could not open $file");
}
// insert new line into beginning of file
$contents = "\n" . $contents;
// fix new-lines
if ($this->fix_new_lines)
{
$contents = str_replace("\r\n","\n",$contents);
后面还有 105 行代码,购买后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。