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


PHP includeFile函数代码示例

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


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

示例1: loadClass

 /**
  * @param string $className
  */
 public function loadClass(string $className)
 {
     if ($filename = $this->generator->checkClass($className)) {
         includeFile($filename);
         return true;
     }
 }
开发者ID:djmattyg007,项目名称:autocodeloader,代码行数:10,代码来源:Autoloader.php

示例2: testExport

 /**
  * Test the export and import admin functionality
  * @runInSeparateProcess
  */
 function testExport()
 {
     global $wbMessageBuffer;
     $this->SessionStart();
     includeFile('admin/admin_port.php');
     $admin_port = new admin_port();
     //create an export
     $_POST = array();
     foreach ($admin_port->export_fields as $key => $info) {
         $_POST[$key] = 'on';
     }
     $_POST['compression'] = 'zip';
     $exported = $admin_port->DoExport();
     self::AssertTrue($exported, 'Export Failed');
     //restore the archive
     $admin_port->SetExported();
     $archive = current($admin_port->exported);
     $_REQUEST = array('archive' => $archive);
     $_POST = array('cmd' => 'revert_confirmed');
     $reverted = $admin_port->Revert('revert_confirmed');
     echo implode("\n\n", $wbMessageBuffer);
     self::AssertTrue($reverted, 'Revert Failed');
     //clean up
     $_POST = array('old_folder' => array_values($admin_port->extra_dirs));
     $admin_port->RevertClean();
     $this->SessionEnd();
 }
开发者ID:VTAMAGNO,项目名称:gpEasy-CMS,代码行数:31,代码来源:ExportTest.php

示例3: GetForm

 /**
  * Return the html of a recaptcha area for use in a  <form>
  * @static
  * @return string
  */
 static function GetForm()
 {
     global $config, $dataDir;
     $html = '';
     if (gp_recaptcha::hasRecaptcha()) {
         includeFile('thirdparty/recaptchalib.php');
         $themes = array('red', 'white', 'blackglass', 'clean');
         $theme = 'clean';
         $lang = $config['recaptcha_language'];
         if ($lang == 'inherit') {
             $lang = $config['language'];
         }
         $recaptchaLangs['en'] = true;
         $recaptchaLangs['nl'] = true;
         $recaptchaLangs['fr'] = true;
         $recaptchaLangs['de'] = true;
         $recaptchaLangs['pt'] = true;
         $recaptchaLangs['ru'] = true;
         $recaptchaLangs['es'] = true;
         $recaptchaLangs['tr'] = true;
         if (isset($recaptchaLangs[$lang])) {
             $html .= '<script type="text/javascript">var RecaptchaOptions = { lang : "' . $lang . '", theme:"' . $theme . '" };</script>';
         }
         $html .= recaptcha_get_html($config['recaptcha_public']);
     }
     return gpPlugin::Filter('AntiSpam_Form', array($html));
 }
开发者ID:GedionChang,项目名称:gpEasy-CMS,代码行数:32,代码来源:recaptcha.php

示例4: SaveChanges

 /**
  * Save changes made to an existing user's permissions
  *
  */
 function SaveChanges()
 {
     global $langmessage, $gpAdmin;
     $username =& $_REQUEST['username'];
     if (!isset($this->users[$username])) {
         message($langmessage['OOPS']);
         return false;
     }
     if (!empty($_POST['email'])) {
         $this->users[$username]['email'] = $_POST['email'];
     }
     $this->users[$username]['granted'] = $this->GetPostedPermissions($username);
     $this->users[$username]['editing'] = $this->GetEditingPermissions();
     //this needs to happen before SaveUserFile();
     //update the /_session file
     includeFile('tool/sessions.php');
     $userinfo =& $this->users[$username];
     $userinfo = gpsession::SetSessionFileName($userinfo, $username);
     //make sure $userinfo['file_name'] is set
     if (!$this->SaveUserFile()) {
         message($langmessage['OOPS']);
         return false;
     }
     // update the $user_file_name file
     $is_curr_user = $gpAdmin['username'] == $username;
     $this->UserFileDetails($username, $is_curr_user);
     return true;
 }
开发者ID:GedionChang,项目名称:gpEasy-CMS,代码行数:32,代码来源:admin_users.php

示例5: loadClass

 protected function loadClass($class)
 {
     if (isset($this->classMap[$class])) {
         return includeFile($this->classMap[$class]);
     } elseif (isset($this->classMap['\\' . $class])) {
         return includeFile($this->classMap['\\' . $class]);
     }
 }
开发者ID:mathewhany,项目名称:class-loader,代码行数:8,代码来源:MapClassLoader.php

示例6: loadClass

 /**
  * Loads the given class or interface.
  *
  * @param   string  $class  The name of the class
  *
  * @return  bool|null True if loaded, null otherwise
  *
  * @since   3.4
  */
 public function loadClass($class)
 {
     if ($file = $this->findFile($class)) {
         includeFile($file);
         \JLoader::applyAliasFor($class);
         return true;
     }
 }
开发者ID:educakanchay,项目名称:kanchay,代码行数:17,代码来源:ClassLoader.php

示例7: UpdateOutputTest

 /**
  * Very rough integration test of the updater
  * Passes if no errors are thrown
  * Also defines $page for subsequent tests
  *
  */
 function UpdateOutputTest()
 {
     global $page;
     ob_start();
     $page = new \gp\admin\Update();
     \gp\tool\Output::HeadContent();
     includeFile('install/template.php');
     ob_get_clean();
 }
开发者ID:Bouhnosaure,项目名称:Typesetter,代码行数:15,代码来源:UpdateTest.php

示例8: UpdateOutputTest

 /**
  * Very rough integration test of the updater
  * Passes if no errors are thrown
  * Also defines $page for subsequent tests
  *
  */
 function UpdateOutputTest()
 {
     global $page;
     ob_start();
     includeFile('tool/update.php');
     $page = new update_class();
     gpOutput::HeadContent();
     includeFile('install/template.php');
     ob_get_clean();
 }
开发者ID:jozefkrz,项目名称:gpEasy-CMS,代码行数:16,代码来源:UpdateTest.php

示例9: _autoload

 function _autoload($className)
 {
     $filesPath = array(BASEPATH . DIRECTORY_SEPARATOR . APPPATH . DIRECTORY_SEPARATOR . LIBRARYPATH . DIRECTORY_SEPARATOR . $className . '.php', BASEPATH . DIRECTORY_SEPARATOR . APPPATH . DIRECTORY_SEPARATOR . MODELS . DIRECTORY_SEPARATOR . $className . '.php', BASEPATH . DIRECTORY_SEPARATOR . APPPATH . DIRECTORY_SEPARATOR . CONTROLLERS . DIRECTORY_SEPARATOR . $className . '.controller.php', BASEPATH . DIRECTORY_SEPARATOR . SYSTEMPATH . DIRECTORY_SEPARATOR . LIBRARYPATH . DIRECTORY_SEPARATOR . $className . '.php', BASEPATH . DIRECTORY_SEPARATOR . SYSTEMPATH . DIRECTORY_SEPARATOR . 'core' . DIRECTORY_SEPARATOR . $className . '.php', BASEPATH . DIRECTORY_SEPARATOR . SYSTEMPATH . DIRECTORY_SEPARATOR . 'database' . DIRECTORY_SEPARATOR . $className . '.php');
     foreach ($filesPath as $file) {
         if (file_exists($file)) {
             includeFile($file);
             break;
         }
     }
 }
开发者ID:Wellingtoncezar,项目名称:pfc,代码行数:10,代码来源:include.php

示例10: MyAutoload

/**
*   includes the path to the dedicated class in the proper folder
*
*   @param string of class name
*/
function MyAutoload($file_name)
{
    $class_path = 'class/' . $file_name . '.php';
    if (file_exists($class_path)) {
        includeFile($class_path);
        echo '<!--' . $class_path . ' loaded with success' . '-->';
    } else {
        echo $file_name . ' not found!';
    }
}
开发者ID:bf-tech,项目名称:calendar,代码行数:15,代码来源:autoload.php

示例11: __construct

 public function __construct($file)
 {
     global $dataDir;
     includeFile('thirdparty/cssmin_v.1.0.php');
     $this->file = $file;
     $this->full_path = $dataDir . $file;
     $this->content = file_get_contents($this->full_path);
     $this->content = \cssmin::minify($this->content);
     $this->CSS_Import();
     $this->CSS_FixUrls();
 }
开发者ID:Bouhnosaure,项目名称:Typesetter,代码行数:11,代码来源:CombineCss.php

示例12: GetForm

 /**
  * Return the html of a recaptcha area for use in a  <form>
  * @static
  * @return string
  */
 public static function GetForm($theme = 'light')
 {
     global $config;
     $html = '';
     if (self::hasRecaptcha()) {
         includeFile('thirdparty/recaptcha/autoload.php');
         $html = '<script src="https://www.google.com/recaptcha/api.js" async defer></script>';
         $html .= '<div class="g-recaptcha" data-theme="' . $theme . '" data-sitekey="' . $config['recaptcha_public'] . '"></div>';
         //data-size="compact"
     }
     return \gp\tool\Plugins::Filter('AntiSpam_Form', array($html));
 }
开发者ID:Bouhnosaure,项目名称:Typesetter,代码行数:17,代码来源:Recaptcha.php

示例13: includeDir

function includeDir($directory) {
	$list = scandir($directory);
	foreach ($list as $listItem) {
		if ($listItem[0] == ".") {
			continue;
		}
		if (is_dir($directory.$listItem)) {
			includeDir($directory.$listItem."/");
		} elseif (substr($listItem, strlen($listItem) - 3) == ".js") {
			includeFile($directory.$listItem);
		}
	}
}
开发者ID:neutrinity,项目名称:jsonary,代码行数:13,代码来源:index.php

示例14: __construct

 function __construct()
 {
     global $dataDir, $langmessage;
     includeFile('tool/install.php');
     echo '<h2>' . $langmessage['Site Status'] . '</h2>';
     $check_dir = $dataDir . '/data';
     $this->check_dir_len = strlen($check_dir);
     $this->euid = '?';
     if (function_exists('posix_geteuid')) {
         $this->euid = posix_geteuid();
     }
     ob_start();
     $this->CheckDir($check_dir);
     $failed_output = ob_get_clean();
     $checked = $this->passed_count + $this->failed_count;
     if ($this->failed_count == 0) {
         echo '<p class="gp_passed">';
         echo sprintf($langmessage['data_check_passed'], $checked, $checked);
         echo '</p>';
         //$this->CheckPageFiles();
         return;
     }
     echo '<p class="gp_notice">';
     echo sprintf($langmessage['data_check_failed'], $this->failed_count, $checked);
     echo '</p>';
     if ($this->failed_count > $this->show_failed_max) {
         echo '<p class="gp_notice">';
         echo sprintf($langmessage['showing_max_failed'], $this->show_failed_max);
         echo '</p>';
     }
     echo '<table class="bordered">';
     echo '<tr><th>';
     echo $langmessage['file_name'];
     echo '</th><th colspan="2">';
     echo $langmessage['permissions'];
     echo '</th><th colspan="2">';
     echo $langmessage['File Owner'];
     echo '</th></tr>';
     echo '<tr><td>&nbsp;</td><td>';
     echo $langmessage['Current_Value'];
     echo '</td><td>';
     echo $langmessage['Expected_Value'];
     echo '</td><td>';
     echo $langmessage['Current_Value'];
     echo '</td><td>';
     echo $langmessage['Expected_Value'];
     echo '</td></tr>';
     echo $failed_output;
     echo '</table>';
     $this->CheckPageFiles();
 }
开发者ID:VTAMAGNO,项目名称:gpEasy-CMS,代码行数:51,代码来源:admin_rm.php

示例15: googleAutoload

function googleAutoload($class)
{
    $hasIncluded = false;
    $hasIncluded2 = false;
    $strClassPath = $class;
    // [className].php in basedir
    $hasIncluded = includeFile(dirname(__FILE__) . DIRECTORY_SEPARATOR . $class . ".php");
    if (empty($hasIncluded) and substr($strClassPath, 0, strlen("Google")) === 'Google') {
        $classFile = CLASSESDIR . DIRECTORY_SEPARATOR . str_replace("_", DIRECTORY_SEPARATOR, $strClassPath) . '.php';
        $hasIncluded = includeFile($classFile);
        if ($hasIncluded) {
            $hasIncluded2 = true;
        }
    }
    if (empty($hasIncluded)) {
        throw new InvalidArgumentException("autoloading of class {$class} impossible. Namespace syntax for classes seems to be wrong.");
    }
}
开发者ID:scaphare,项目名称:QGoogleVisualizationAPI,代码行数:18,代码来源:config.inc.php


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