本文整理汇总了PHP中include_file函数的典型用法代码示例。如果您正苦于以下问题:PHP include_file函数的具体用法?PHP include_file怎么用?PHP include_file使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了include_file函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: jeedomPluginAutoload
function jeedomPluginAutoload($classname)
{
$plugin = null;
try {
$plugin = plugin::byId($classname);
} catch (Exception $e) {
if (!is_object($plugin)) {
if (strpos($classname, 'Real') !== false) {
$plugin = plugin::byId(substr($classname, 0, -4));
}
if (!is_object($plugin) && strpos($classname, 'Cmd') !== false) {
$classname = str_replace('Cmd', '', $classname);
try {
$plugin = plugin::byId($classname);
} catch (Exception $e) {
if (strpos($classname, '_') !== false && strpos($classname, 'com_') === false) {
$plugin = plugin::byId(substr($classname, 0, strpos($classname, '_')));
}
}
}
if (!is_object($plugin) && strpos($classname, '_') !== false && strpos($classname, 'com_') === false) {
$plugin = plugin::byId(substr($classname, 0, strpos($classname, '_')));
}
}
}
try {
if (is_object($plugin)) {
if ($plugin->isActive() == 1) {
$include = $plugin->getInclude();
include_file('core', $include['file'], $include['type'], $plugin->getId());
}
}
} catch (Exception $e) {
}
}
示例2: load
private function load($name)
{
$file = $this->dir . '/' . strtolower($name) . '.inc.php';
if (!is_file($file)) {
trigger_error(__CLASS__ . ": The file '{$file}' does not exist.", E_USER_ERROR);
}
$this->items[$name] = include_file($file);
}
示例3: __autoload
function __autoload($className)
{
static $subdirs = array('.', 'filters', 'types', 'tree');
$fileName = strtolower($className) . '.inc.php';
foreach ($subdirs as $subdir) {
$fileToTry = dirname(__FILE__) . "/{$subdir}/{$fileName}";
if (file_exists($fileToTry)) {
include_file($fileToTry);
return;
}
}
trigger_error("Autoloader: The class called '{$className}' was not found.", E_USER_ERROR);
}
示例4: autoloader
function autoloader($class_name)
{
$blastpad_module_path = defined("blastpad_module_path") ? blastpad_module_path : "";
// Get just the class name.
$class_name = end(explode("\\", $class_name));
// Class directories.
$directory = ["blastpad_cms", "common", "calliope_database", "zigzag_routing", "snowflake_authentication"];
// Go through each directory to find the class.
foreach ($directory as $dir) {
include_file($blastpad_module_path . "/" . $dir . "/class/" . $class_name . "_class.php");
include_file($blastpad_module_path . "/" . $dir . "/model/" . $class_name . ".php");
}
}
示例5: array
function &include_class($file, $options = array())
{
static $objects = array();
#$file = $class;
if (strrpos($file, '.')) {
$file = substr($file, 0, strrpos($file, '.'));
}
if (isset($options['class'])) {
$class = $options['class'];
} else {
$class = $file;
}
//If theres another prefix, substitue lib_ with it. Otherwise use lib_
if (isset($options['class_prefix'])) {
$class = $options['class_prefix'] . $class;
} elseif (isset($options['path']) && preg_match("/\\bmodel\\b/i", $options['path'])) {
$class = 'model_' . $class;
} elseif (isset($options['path']) && preg_match("/\\bpage\\b/i", $options['path'])) {
$class = 'page_' . $class;
}
//Work out the class name and check if it already exists
$class = str2class(str_replace('.', '', $class));
$classCheck = check_class_loaded($class, TRUE);
if ($classCheck) {
return $objects[$class];
}
//Load the class
if (isset($options['path'])) {
include_file($options['path'] . $file . EXT, $options);
} else {
include_file(BASEDIR . $file . EXT, $options);
}
//Load the class
$objects[$class] = new $class();
//Log the class loading
check_class_loaded($class, FALSE);
//Return the class value
return $objects[$class];
}
示例6: include_file
<tr>
<th style="width: 300px;">{{Nom}}</th>
<th style="width: 130px;" class="expertModeVisible">{{Type}}</th>
<th class="expertModeVisible">{{Instance ID}}</th>
<th class="expertModeVisible">{{Classe}}</th>
<th class="expertModeVisible">{{Commande}}</th>
<th style="width: 100px;">{{Paramètres}}</th>
<th style="width: 100px;">{{Options}}</th>
<th></th>
</tr>
</thead>
<tbody>
</tbody>
</table>
<form class="form-horizontal">
<fieldset>
<div class="form-actions">
<a class="btn btn-danger eqLogicAction" data-action="remove"><i class="fa fa-minus-circle"></i> {{Supprimer}}</a>
<a class="btn btn-success eqLogicAction" data-action="save"><i class="fa fa-check-circle"></i> {{Sauvegarder}}</a>
</div>
</fieldset>
</form>
</div>
</div>
<?php
include_file('desktop', 'openzwave', 'js', 'openzwave');
include_file('core', 'plugin.template', 'js');
示例7: include_file
<div class="alert alert-danger div_alert" style="display: none;" id="div_addEditviewZoneError"></div>
<input id="in_addEditviewZoneEmplacement" style="display : none;" />
<form class="form-horizontal" onsubmit="return false;">
<div class="form-group">
<label class="col-sm-2 control-label">{{Nom}}</label>
<div class="col-sm-5">
<input id="in_addEditviewZoneName" class="form-control" placeholder="{{Nom}}" />
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">{{Type}}</label>
<div class="col-sm-5">
<select class="form-control" id="sel_addEditviewZoneType">
<option value="widget">{{Widget}}</option>
<option value="graph">{{Graphique}}</option>
</select>
</div>
</div>
</form>
</div>
<div class="modal-footer">
<a class="btn btn-danger" data-dismiss="modal">{{Annuler}}</a>
<a class="btn btn-success" id="bt_addEditviewZoneSave"><i class="fa fa-save"></i> {{Enregistrer}}</a>
</div>
</div>
</div>
</div>
<?php
include_file('desktop', 'view_edit', 'js');
示例8: include_file
</tr><tr>
<td><b>{{Nombre de messages reçus avec statut de routage occupé :}}</b></td><td> <span class="stats_routedbusy"></span></td>
</tr>
</table>
</div>
</div>
</div>
</div>
</div>
</div>
<?php
include_file('desktop', 'network', 'js', 'openzwave');
?>
<script>
var path = $('#sel_zwaveNetworkServerId option:selected').attr('data-path')+'/';
$("#sel_zwaveNetworkServerId").on("change",function() {
path = $('#sel_zwaveNetworkServerId option:selected').attr('data-path')+'/';
window["app_network"].init();
window["app_network"].show();
window["app_network"].displayRoutingTable();
window["app_network"].load_data();
});
var nodes = {};
if (window["app_network"]!=undefined){
window["app_network"].init();
window["app_network"].show();
}
示例9: include_file
</div>
<div class="col-sm-6" >
<legend>{{Apercu}}
<a class="btn btn-xs btn-default pull-right" id="bt_applyWidget"><i class="fa fa-fire"></i> {{Appliquer sur des commandes}}</a>
<a class="btn btn-xs btn-warning pull-right" id="bt_shareOnMarket"><i class="fa fa-cloud-upload"></i> {{Partager}}</a>
<a class="btn btn-xs btn-success pull-right" id="bt_editWidget" style="display:none"><i class="fa fa-cloud-upload"></i> {{Editer}}</a>
</legend>
<div class="col-sm-6" id='div_widgetResult'></div>
</div>
</div>
<a class="btn btn-default btn-xs" id="bt_insertIcon"><i class="fa fa-flag"></i> Rechercher une icone</a><br/><br/>
<textarea class='form-control widgetAttr' data-l1key='content' id='ta_widgetContent' style='height: 500px;'></textarea>
<form class="form-horizontal">
<fieldset>
<div class="form-actions">
<a class="btn btn-danger widgetAction" data-action="remove"><i class="fa fa-minus-circle"></i> {{Supprimer}}</a>
<a class="btn btn-success widgetAction" data-action="save"><i class="fa fa-check-circle"></i> {{Sauvegarder}}</a>
</div>
</fieldset>
</form>
</div>
</div>
<?php
include_file('desktop', 'fonts.widget', 'js', 'widget');
include_file('desktop', 'other.widget', 'js', 'widget');
include_file('desktop', 'binary.widget', 'js', 'widget');
include_file('desktop', 'numeric.widget', 'js', 'widget');
include_file('desktop', 'widget', 'js', 'widget');
示例10: include_file
</div>
</fieldset>
</form>
<legend>{{#plugin_name#}}</legend>
<table id="table_cmd" class="table table-bordered table-condensed">
<thead>
<tr>
<th>{{Nom}}</th><th>{{Type}}</th><th>{{Action}}</th>
</tr>
</thead>
<tbody>
</tbody>
</table>
<form class="form-horizontal">
<fieldset>
<div class="form-actions">
<a class="btn btn-danger eqLogicAction" data-action="remove"><i class="fa fa-minus-circle"></i> {{Supprimer}}</a>
<a class="btn btn-success eqLogicAction" data-action="save"><i class="fa fa-check-circle"></i> {{Sauvegarder}}</a>
</div>
</fieldset>
</form>
</div>
</div>
<?php
include_file('desktop', '#plugin_id#', 'js', '#plugin_id#');
include_file('core', 'plugin.ajax', 'js');
示例11: dirname
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Jeedom 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 General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with Jeedom. If not, see <http://www.gnu.org/licenses/>.
*/
require_once dirname(__FILE__) . '/../../../core/php/core.inc.php';
include_file('core', 'authentification', 'php');
if (!isConnect()) {
include_file('desktop', '404', 'php');
die;
}
$deamonRunningMaster = openzwave::deamonRunning();
$deamonRunningSlave = array();
$deamonSlaveVersion = array();
if (config::byKey('jeeNetwork::mode') == 'master') {
foreach (jeeNetwork::byPlugin('openzwave') as $jeeNetwork) {
$deamonSlaveVersion[$jeeNetwork->getName()] = array('openzwave' => 0, 'python-openzwave' => 0);
$deamonRunningSlave[$jeeNetwork->getName()] = false;
try {
$deamonRunningSlave[$jeeNetwork->getName()] = $jeeNetwork->sendRawRequest('deamonRunning', array('plugin' => 'openzwave'));
$deamonSlaveVersion[$jeeNetwork->getName()]['openzwave'] = $jeeNetwork->sendRawRequest('getVersion', array('plugin' => 'openzwave', 'module' => 'openzwave'));
$deamonSlaveVersion[$jeeNetwork->getName()]['compilation'] = $jeeNetwork->sendRawRequest('compilationOk', array('plugin' => 'openzwave'));
} catch (Exception $e) {
}
示例12: Exception
* You should have received a copy of the GNU General Public License
* along with Jeedom. If not, see <http://www.gnu.org/licenses/>.
*/
if (!isConnect('admin')) {
throw new Exception('{{401 - Accès non autorisé}}');
}
if (init('path') == '') {
throw new Exception('{{Aucun widget fourni}}');
}
$widget = widget::byPath(init('path'));
if (!is_object($widget)) {
throw new Exception('{{Widget non trouvé}}');
}
include_file('3rdparty', 'jquery.tablesorter/theme.bootstrap', 'css');
include_file('3rdparty', 'jquery.tablesorter/jquery.tablesorter.min', 'js');
include_file('3rdparty', 'jquery.tablesorter/jquery.tablesorter.widgets.min', 'js');
?>
<div style="display: none;" id="md_applyWidgetAlert"></div>
<div style="position: fixed;height: 50px;background-color: white;margin-top:-6px;padding-top: 6px;" id="div_boutons">
<a class="btn btn-default" id="bt_applyWidgetToogle" data-state="0"><i class="fa fa-check-circle-o"></i> {{Basculer}}</a>
<a class="btn btn-success pull-right bt_applyWidgetToCmd" data-path="<?php
echo $widget->getPath();
?>
" style="color : white;" data-version=""><i class="fa fa-check"></i> {{Valider}}</a>
</div>
<br/><br/>
<table class="table table-bordered table-condensed tablesorter" id="table_applyWidget">
<thead>
<tr>
示例13: foreach
echo '<option value="' . $planHeader_select->getId() . '">' . $planHeader_select->getName() . '</option>';
}
?>
</select>
</div>
<div class="linkview linkOption" style="display: none;">
<select class="form-control linkId">
<?php
foreach (view::all() as $views) {
echo '<option value="' . $views->getId() . '">' . $views->getName() . '</option>';
}
?>
</select>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">{{Annuler}}</button>
<button type="button" class="btn btn-primary validate">{{Valider}}</button>
</div>
</div><!-- /.modal-content -->
</div><!-- /.modal-dialog -->
</div><!-- /.modal -->
<div id="md_addViewData" title="Ajouter widget/graph"></div>
<?php
}
?>
<?php
include_file('desktop', 'plan', 'js');
示例14: Exception
*/
if (!isConnect('admin')) {
throw new Exception('{{401 - Accès non autorisé}}');
}
if (init('id') == '') {
throw new Exception('{{EqLogic ID ne peut être vide}}');
}
$eqLogic = eqLogic::byId(init('id'));
if (!is_object($eqLogic)) {
throw new Exception('{{Equipement non trouvé}}');
}
include_file('3rdparty', 'jquery.tablesorter/theme.bootstrap', 'css');
include_file('3rdparty', 'jquery.tablesorter/jquery.tablesorter.min', 'js');
include_file('3rdparty', 'jquery.tablesorter/jquery.tablesorter.widgets.min', 'js');
global $listClassCommand;
include_file('core', 'class.command', 'config', 'zwave');
?>
<div id='div_showClassAlert' style="display: none;"></div>
<div class="row">
<div class="col-sm-3">
<table id="table_class" class="table table-bordered table-condensed tablesorter">
<thead>
<tr>
<th>{{Classes}}</th>
</tr>
</thead>
<tbody>
<?php
foreach ($eqLogic->getAvailableCommandClass() as $commandClasses) {
echo '<tr data-commandClass="' . $commandClasses . '" class="cursor">';
echo '<td>';
示例15: include_file
</div>
<div class="form-group">
<label class="col-lg-2 col-md-3 col-sm-4 col-xs-6 control-label">{{Couleur du tag}}</label>
<div class="col-lg-2 col-md-2 col-sm-2 col-xs-2">
<input type="color" class="objectAttr form-control" data-l1key="display" data-l2key="tagColor" />
</div>
</div>
<div class="form-group">
<label class="col-lg-2 col-md-3 col-sm-4 col-xs-6 control-label">{{Couleur du texte du tag}}</label>
<div class="col-lg-2 col-md-2 col-sm-2 col-xs-2">
<input type="color" class="objectAttr form-control" data-l1key="display" data-l2key="tagTextColor" />
</div>
</div>
</fieldset>
</form>
<hr/>
<form class="form-horizontal">
<fieldset>
<div class="form-actions">
<a class="btn btn-danger" id="bt_removeObject"><i class="fa fa-minus-circle"></i> {{Supprimer}}</a>
<a class="btn btn-success" id="bt_saveObject"><i class="fa fa-check-circle"></i> {{Sauvegarder}}</a>
</div>
</fieldset>
</form>
</div>
</div>
<?php
include_file("desktop", "object", "js");