本文整理汇总了PHP中file_exists_incpath函数的典型用法代码示例。如果您正苦于以下问题:PHP file_exists_incpath函数的具体用法?PHP file_exists_incpath怎么用?PHP file_exists_incpath使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了file_exists_incpath函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: checkLoginPath
public function checkLoginPath()
{
$n = $_SERVER['SERVER_NAME'];
$this->login_path = reset(explode('?', $this->login_path));
if (stripos($this->login_path, $n) === false) {
return;
}
if ('http://' . $n . $_SERVER['REQUEST_URI'] == $this->login_path) {
return;
}
$name = str_replace(array($n, 'http://'), '', $this->login_path);
$dirs = array_filter(explode('/', $name));
global $access_groups;
$path = null;
foreach ($dirs as $dir) {
if (!$path) {
$path = 'pages/' . $dir . '/';
} else {
$path .= $dir . '/';
}
$settings_file = $path . $dir . '-settings.php';
if (file_exists_incpath($settings_file)) {
include $settings_file;
}
}
}
开发者ID:hshoghi,项目名称:cms,代码行数:26,代码来源:class.Login.php
示例2: parse_file_comments
function parse_file_comments($file_name)
{
$custom_file_name = AMP_LOCAL_PATH . '/custom/' . $file_name . '.ini.php';
if (!file_exists($custom_file_name)) {
$custom_file_name = 'Config/' . $file_name . '.ini.php';
if (!file_exists_incpath($custom_file_name)) {
return array();
}
}
$fileRef = fopen($custom_file_name, 'r');
$result = array();
$current_header = '';
while ($line = fgets($fileRef)) {
if (strlen($line) < 2) {
continue;
}
if (substr($line, 0, 1) == ';') {
$current_header .= substr($line, 1);
continue;
}
if (!$current_header) {
continue;
}
$line_name = str_replace(array('[', ']'), '', reset(split('=', $line)));
$result[$line_name] = $current_header;
$current_header = '';
}
return $result;
}
开发者ID:radicaldesigns,项目名称:amp,代码行数:29,代码来源:Form.php
示例3: _load_template_file
function _load_template_file($request_path)
{
$path_verified = false;
$path_exists = file_exists_incpath($request_path);
if ($path_exists) {
$path_verified = $path_exists;
} else {
$test_path = $this->_path_default . basename($request_path);
if ($path_exists = file_exists_incpath($test_path)) {
$path_verified = $path_exists;
}
}
if (file_exists($path_verified)) {
return file_get_contents($path_verified);
}
/*
$paths = explode(PATH_SEPARATOR, get_include_path());
foreach ($paths as $path)
{
// Formulate the absolute path
$fullpath = $path . DIRECTORY_SEPARATOR . $path_verified;
// Check it
if (file_exists($fullpath)) {
return file_get_contents( $fullpath );
}
}
return false;
*/
}
开发者ID:radicaldesigns,项目名称:amp,代码行数:30,代码来源:Template.php
示例4: getFile
function getFile()
{
$fullpath = $this->locateFile();
if (!file_exists_incpath($fullpath)) {
return false;
}
return file_get_contents($fullpath, true);
}
开发者ID:radicalsuz,项目名称:amp,代码行数:8,代码来源:XMLFields.inc.php
示例5: getFile
function getFile()
{
//$fullpath = AMP_pathFlip( $this->locateFile() );
$fullpath = $this->locateFile();
if (!($fullpath && file_exists_incpath($fullpath))) {
return false;
}
return file_get_contents($fullpath, true);
}
开发者ID:radicaldesigns,项目名称:amp,代码行数:9,代码来源:XMLEngine.inc.php
示例6: globalAqlModelLoader
/**
* loads aql model classes
* models/{name}/class.{name}.php
* @param string $name
* @return boolean
* @global $sky_aql_model_path
*/
public static function globalAqlModelLoader($name)
{
global $sky_aql_model_path;
$path = sprintf('%s/%s/class.%s.php', $sky_aql_model_path, $name, $name);
if (file_exists_incpath($path)) {
include $path;
if (class_exists($className)) {
return true;
}
}
return false;
}
开发者ID:HotwireCommunications,项目名称:skyphp,代码行数:19,代码来源:Autoloader.php
示例7: _getFieldOverrides
function _getFieldOverrides($file_name)
{
$override_file_name = str_replace('.xml', '_Override.xml', $file_name);
$override_file_path = file_exists_incpath($override_file_name);
if (!$override_file_name) {
return array();
}
$field_overrides = $this->_readXML($override_file_path);
if (!$field_overrides) {
return array();
}
return $field_overrides;
}
开发者ID:radicaldesigns,项目名称:amp,代码行数:13,代码来源:XML.inc.php
示例8: evalnavhtml
function evalnavhtml($string)
{
global $base_path, $dbcon, $MM_type, $MM_parent, $MM_typename, $list, $id, $MM_issue, $MM_region, $navalign;
global $rNAV_HTML_1, $rNAV_HTML_2, $rNAV_HTML_3, $rNAV_HTML_4, $rNAV_HTML_5;
global $lNAV_HTML_1, $lNAV_HTML_2, $lNAV_HTML_3, $lNAV_HTML_4, $lNAV_HTML_5;
if (!isset($start)) {
$start = '';
}
$pos = strpos($string, '<?php', $start);
$start = 0;
/* Loop through to find the php code in html... */
while (!($pos === FALSE)) {
/* Find the end of the php code.. */
$pos2 = strpos($string, "?>", $pos + 5);
/* Eval outputs directly to the buffer. Catch / Clean it */
$code = substr($string, $pos + 5, $pos2 - $pos - 5);
$variables = preg_replace('/.*\\$([^\\s]*)\\s*=\\s*["\']{0,1}([^"\']*)["\']{0,1}.*/', "\$1 \$2", $code);
$va_args = split(" ", $variables);
if ($va_args[0] == 'regionlink') {
$regionlink = $va_args[1];
}
if ($va_args[0] == 'navalign') {
$navalign = $va_args[1];
}
//echo $regionlink.'<br>';
$include_args = preg_replace("/.*include\\s*[\\(\\s*]?\\s*\"?([^\\)\"\\s]*)\"?[\\)\\s*]?.*/", "\$1", $code);
$incl = str_replace('"', '', $include_args);
#echo $incl.'<br>';
ob_start();
$customfile = AMP_LOCAL_PATH . DIRECTORY_SEPARATOR . 'custom' . DIRECTORY_SEPARATOR . $incl;
if (file_exists($customfile)) {
include $customfile;
} else {
$basefile = 'AMP/Nav/' . $incl;
if (file_exists_incpath($basefile)) {
include $basefile;
} elseif (file_exists_incpath($incl)) {
$file = $incl;
include $file;
}
}
$value = ob_get_contents();
ob_end_clean();
/* Grab that chunk! */
$start = $pos + strlen($value);
$string = substr($string, 0, $pos) . $value . substr($string, $pos2 + 2);
$pos = strpos($string, '<?php', $start);
}
return $string;
}
开发者ID:radicaldesigns,项目名称:amp,代码行数:50,代码来源:navselect.php
示例9: _register_fields_dynamic
function _register_fields_dynamic()
{
$options = $this->getOptions();
if (!(isset($options['override_file']) && $options['override_file'])) {
return;
}
if (!file_exists_incpath($options['override_file'])) {
trigger_error("can't find override file {$options['override_file']}");
return;
}
$override_fields = $this->_read_xml_fields($options['override_file']);
if (!$override_fields) {
trigger_error("XML read failed for override file {$options['override_file']}");
return;
}
$this->udm->fields = array_merge($this->udm->fields, $override_fields);
}
开发者ID:radicalsuz,项目名称:amp,代码行数:17,代码来源:Override.inc.php
示例10: _loadItemType
function _loadItemType($type)
{
if (!isset($this->_content_item_types[$type])) {
return false;
}
if (class_exists($this->_content_item_types[$type])) {
return true;
}
$load_filename = 'AMP/Content/' . ucfirst($type) . '.inc.php';
if (isset($this->_content_item_paths[$type])) {
$load_filename = $this->_content_item_paths[$type];
}
if (!file_exists_incpath($load_filename)) {
return false;
}
include_once $load_filename;
return $this->_content_item_paths[$type];
}
开发者ID:radicaldesigns,项目名称:amp,代码行数:18,代码来源:ContentSet.inc.php
示例11: execute
function execute()
{
if ($badge_id = $this->nav->getBadgeId()) {
return $this->do_badge($badge_id);
}
if (!($filename = $this->nav->getIncludeFile())) {
return false;
}
$fullpath = file_exists_incpath($filename);
if (!$fullpath) {
$fullpath = file_exists_incpath('AMP/Nav/' . $filename);
}
if (!$fullpath) {
return false;
}
$nav_class = $this->nav->getIncludeClass();
$nav_function = $this->nav->getIncludeFunction();
if (!$nav_class && !$nav_function) {
return $this->_raw_include($fullpath);
}
//include the file -- don't make a mess in these guys!
include_once $fullpath;
if (!$nav_class && is_callable($nav_function)) {
return $nav_function($this->get_arguments());
}
return $this->_raw_include($fullpath);
/*
$nav = false;
if ( $nav_class && class_exists( $nav_class )) {
$nav = &new $nav_class( );
}
if ( $nav ) {
if ( is_callable( array( $nav, $nav_function ))) {
return $nav->$nav_function( );
}
if ( method_exists( $nav, 'execute' )) {
return $nav->execute( );
}
}
*/
}
开发者ID:radicalsuz,项目名称:amp,代码行数:42,代码来源:EnginePHP.inc.php
示例12: str_replace
function &makeCopier($classname)
{
$filename = 'AMP/System/' . str_replace("_", DIRECTORY_SEPARATOR, $classname) . '/Copy.inc.php';
if (file_exists_incpath($filename)) {
include_once $filename;
}
$new_class = 'AMPSystem_' . $classname . '_Copy';
if (class_exists($new_class)) {
return new $new_class($this->dbcon);
}
trigger_error('AMPSystem_Copier: ' . $new_class . ' not found');
return false;
}
开发者ID:radicaldesigns,项目名称:amp,代码行数:13,代码来源:Copy.inc.php
示例13: get_available_dbms
/**
* Returns an array of available DBMS with some data, if a DBMS is specified it will only
* return data for that DBMS and will load its extension if necessary.
*/
function get_available_dbms($dbms = false, $return_unavailable = false)
{
global $lang;
$available_dbms = array('firebird' => array('LABEL' => 'FireBird', 'SCHEMA' => 'firebird', 'MODULE' => 'interbase', 'DELIM' => ';;', 'COMMENTS' => 'remove_remarks', 'DRIVER' => 'firebird', 'AVAILABLE' => true), 'mysqli' => array('LABEL' => 'MySQL with MySQLi Extension', 'SCHEMA' => 'mysql', 'MODULE' => 'mysqli', 'DELIM' => ';', 'COMMENTS' => 'remove_remarks', 'DRIVER' => 'mysqli', 'AVAILABLE' => true), 'mysql' => array('LABEL' => 'MySQL', 'SCHEMA' => 'mysql', 'MODULE' => 'mysql', 'DELIM' => ';', 'COMMENTS' => 'remove_remarks', 'DRIVER' => 'mysql', 'AVAILABLE' => true), 'mssql' => array('LABEL' => 'MS SQL Server 2000+', 'SCHEMA' => 'mssql', 'MODULE' => 'mssql', 'DELIM' => 'GO', 'COMMENTS' => 'remove_comments', 'DRIVER' => 'mssql', 'AVAILABLE' => true), 'mssql_odbc' => array('LABEL' => 'MS SQL Server [ ODBC ]', 'SCHEMA' => 'mssql', 'MODULE' => 'odbc', 'DELIM' => 'GO', 'COMMENTS' => 'remove_comments', 'DRIVER' => 'mssql_odbc', 'AVAILABLE' => true), 'oracle' => array('LABEL' => 'Oracle', 'SCHEMA' => 'oracle', 'MODULE' => 'oci8', 'DELIM' => '/', 'COMMENTS' => 'remove_comments', 'DRIVER' => 'oracle', 'AVAILABLE' => true), 'pgsql' => array('LABEL' => 'PostgreSQL 7.x/8.x', 'SCHEMA' => 'postgres', 'MODULE' => 'pgsql', 'DELIM' => ';', 'COMMENTS' => 'remove_comments', 'DRIVER' => 'postgres', 'AVAILABLE' => true), 'sqlite' => array('LABEL' => 'SQLite', 'SCHEMA' => 'sqlite', 'MODULE' => 'sqlite', 'DELIM' => ';', 'COMMENTS' => 'remove_remarks', 'DRIVER' => 'sqlite', 'AVAILABLE' => true));
if ($dbms) {
if (isset($available_dbms[$dbms])) {
$available_dbms = array($dbms => $available_dbms[$dbms]);
} else {
return array();
}
}
// now perform some checks whether they are really available
foreach ($available_dbms as $db_name => $db_ary) {
$dll = $db_ary['MODULE'];
if (!@extension_loaded($dll) || !file_exists_incpath("MDB2" . DIRECTORY_SEPARATOR . "Driver" . DIRECTORY_SEPARATOR . $db_name . ".php")) {
#if (!can_load_dll($dll))
#{
if ($return_unavailable) {
$available_dbms[$db_name]['AVAILABLE'] = false;
} else {
unset($available_dbms[$db_name]);
}
continue;
#}
}
$any_db_support = true;
}
if ($return_unavailable) {
$available_dbms['ANY_DB_SUPPORT'] = $any_db_support;
}
return $available_dbms;
}
开发者ID:noikiy,项目名称:owaspbwa,代码行数:36,代码来源:installFunctions.php
示例14: _getIncludeFilename
function _getIncludeFilename($code)
{
$include_args = preg_replace("/.*include\\s*[\\(\\s*]?\\s*\"?([^\\)\"\\s]*)\"?[\\)\\s*]?.*/", "\$1", $code);
$incl = str_replace('"', '', $include_args);
$customfile = AMP_LOCAL_PATH . DIRECTORY_SEPARATOR . 'custom' . DIRECTORY_SEPARATOR . $incl;
if (file_exists($customfile)) {
return $customfile;
}
$basefile = 'AMP/Nav/' . $incl;
if (file_exists_incpath($basefile)) {
return $basefile;
}
if (file_exists_incpath($incl)) {
return $incl;
}
return false;
}
开发者ID:radicaldesigns,项目名称:amp,代码行数:17,代码来源:EngineHTML.inc.php
示例15: inc
/**
* Includes the template and sets the body of the email with it
* @param string $name name of template or path to php file
* @param array $data
* @return $this
* @throws Exception if using a Mailer template and there is no inc_dir
* @throws Excpetion if the file to include does not exist
*/
public function inc($name, array $data = array())
{
if (strpos($name, '.php')) {
$include = $name;
} else {
if (!self::$inc_dir) {
throw new Exception('Mailer::$inc_dir not set.');
}
$include = self::$inc_dir . $name . '.php';
}
if (!file_exists_incpath($include)) {
throw new Exception('Mailer "' . $include . '" does not exist');
}
return $this->setBody($this->_includeTemplate($include, $data));
}
开发者ID:hshoghi,项目名称:cms,代码行数:23,代码来源:class.Mailer.php
示例16: _getIncludeFilename
function _getIncludeFilename($code)
{
$filename = trim($code);
if (file_exists_incpath($filename)) {
return $filename;
}
return false;
}
开发者ID:radicalsuz,项目名称:amp,代码行数:8,代码来源:HTML.inc.php
示例17: _setIncludeFileValues
function _setIncludeFileValues()
{
$filepaths = $this->component_map->getFilePaths();
foreach ($filepaths as $type => $filename) {
if (!file_exists_incpath($filename)) {
trigger_error('System Page did not find component ' . $type . ' at: ' . $filename);
continue;
}
$this->includes[$type] = $filename;
}
}
开发者ID:radicaldesigns,项目名称:amp,代码行数:11,代码来源:Page.inc.php
示例18: includeForm
/**
* Includes the form file (path/to/models/Model/form.Model.php) in $this scope
* @return Model
* @throws Exception path not found
*/
public function includeForm()
{
$path = $this->getFormPath();
if (!file_exists_incpath($path)) {
throw new Exception("Form file [{$path}] does not exist for this model");
}
$r = $o = $this;
include $path;
return $this;
}
开发者ID:HotwireCommunications,项目名称:skyphp,代码行数:15,代码来源:class.Model.php
示例19: __construct
/**
* Constructor takes optional parameters to create a new error. If parameters are omitted, an empty (non-error state)
* error object is created. An error state can subsequently be set using the setError() method
*
* @param integer $pn_error_number The numeric error code. Code should be defined in the error definition file
* @param string $ps_error_description Description of error condition
* @param string $ps_error_context Context where error occurred. This is typically the Class name and method name where the error occurred. Ex. "Configuration->new()"
* @param string $ps_error_source Source of error - typically a string identifying the field in a form where the error occurred.
* @param bool $pb_halt_on_error Whether or not to halt on error state (ie. whether do die()) [default is true]
* @param bool $pb_report_on_error Whether or not to emit a visible report of error state [default is true]
* @param string $ps_error_definition_file Path to error definition file; if omitted default file, based upon locale, is used
*/
public function __construct($pn_error_number = 0, $ps_error_description = '', $ps_error_context = '', $ps_error_source = '', $pb_halt_on_error = true, $pb_report_on_error = true, $ps_error_definition_file = '')
{
$this->opo_config = Configuration::load();
$this->ops_redirect_on_error_page = $this->opo_config->get("error_redirect_to_page");
# Set locale, if necessary
if (($vs_locale = $this->opo_config->get("locale")) && (file_exists("Error/errors." . $vs_locale) || file_exists_incpath("Error/errors." . $vs_locale))) {
$this->ops_locale = $vs_locale;
}
# load error messages
$vs_error_definitions_loaded = 0;
if ($ps_error_definition_file) {
$vs_error_definitions_loaded = $this->setErrorDefinitionFile($ps_error_definition_file);
} else {
if ($vs_config_error_definition_file = $this->opo_config->get("error_definition_file")) {
$vs_error_definitions_loaded = $this->setErrorDefinitionFile($vs_config_error_definition_file);
}
}
if (!$vs_error_definitions_loaded) {
$vs_error_definitions_loaded = $this->setErrorDefinitionFile(__CA_LIB_DIR__ . "/core/Error/errors." . $this->ops_locale);
}
if (!$vs_error_definitions_loaded) {
$vs_error_definitions_loaded = $this->setErrorDefinitionFile(__CA_LIB_DIR__ . "/core/Error/errors.en_us");
}
if (!$vs_error_definitions_loaded) {
die("Error.php: Couldn't load error definitions!\n");
}
$this->opb_halt_on_error = $pb_halt_on_error;
$this->opb_report_on_error = $pb_report_on_error;
if ($pn_error_number) {
$this->setError($pn_error_number, $ps_error_description, $ps_error_context);
}
}
开发者ID:guaykuru,项目名称:pawtucket,代码行数:44,代码来源:Error.php
示例20: array
<?php
require_once 'AMP/UserData/Plugin.inc.php';
require_once 'AMP/Region.inc.php';
if (file_exists_incpath('custom.layouts.inc.php')) {
include_once 'custom.layouts.inc.php';
}
class UserDataPlugin_DisplayHTML_Output extends UserDataPlugin
{
var $options = array('subheader' => array('available' => true, 'label' => 'Show subheadings for', 'default' => '', 'type' => 'text'), 'subheader2' => array('available' => true, 'label' => 'Show second-level subheadings for', 'default' => '', 'type' => 'text'), 'subheader3' => array('available' => true, 'label' => 'Show third-level subheadings for', 'default' => '', 'type' => 'text'), 'display_format' => array('label' => 'List Display Function Name', 'default' => 'list_display_default', 'available' => true, 'type' => 'text'), 'detail_format' => array('label' => 'Detail Display Function Name', 'default' => 'detail_display_default', 'available' => true, 'type' => 'text'), 'header_text_list' => array('label' => 'Intro Text For List Page', 'default' => '1', 'available' => true, 'type' => 'select'), 'header_text_detail' => array('label' => 'Intro Text For Detail Page', 'default' => '1', 'available' => true, 'type' => 'select'), 'column_count' => array('label' => 'Columns for display', 'default' => '1', 'available' => true, 'type' => 'text', 'size' => '3'), 'column_renderer' => array('label' => 'Column Wrapper Function Name', 'default' => '', 'available' => true, 'type' => 'text'), '_userid' => array('default' => null, 'available' => false));
var $available = true;
//multiple subheaders - yay!
var $current_subheader;
var $current_subheader2;
var $current_subheader3;
var $regionset;
var $alias = array('Name' => array('f_alias' => 'Name', 'f_orderby' => 'Last_Name,First_Name', 'f_type' => 'text', 'f_sqlname' => "Concat(if(!isnull(First_Name), First_Name, ''), ' ', if(!isnull(Last_Name), Last_Name, '') )"), 'Location' => array('f_alias' => 'Location', 'f_sqlname' => "Concat( if(!isnull(Country), Concat(Country, ' - '),''), if(!isnull(State), Concat(State, ' - '),''), if(!isnull(City), City,''))", 'f_orderby' => '(if(Country="USA",1,if(Country="CAN",2,if(isnull(Country),3,Country)))),State,City,Company', 'f_type' => 'text'), 'Status' => array('f_alias' => 'Status', 'f_orderby' => 'publish', 'f_type' => 'text', 'f_sqlname' => 'if(publish=1,"Live","Draft")'));
var $_css_class_container_list_column = 'list_column';
var $_css_class_container_list = 'list_form';
var $_css_class_container_list_item = 'list_item';
var $is_last_column = false;
function UserDataPlugin_DisplayHTML_Output(&$udm, $instance = null)
{
$this->init($udm, $instance);
$this->regionset = new Region();
}
function _register_options_dynamic()
{
if ($this->udm->admin) {
/*
$udm_mod_id = $this->dbcon->qstr( $this->udm->instance );
开发者ID:radicaldesigns,项目名称:amp,代码行数:31,代码来源:DisplayHTML.inc.php
注:本文中的file_exists_incpath函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论