本文整理汇总了PHP中preload函数的典型用法代码示例。如果您正苦于以下问题:PHP preload函数的具体用法?PHP preload怎么用?PHP preload使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了preload函数的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: main
/** Main program. */
function main()
{
preload();
$interpreter = new Interpreter();
$interpreter->hello();
$interpreter->bye();
}
示例2: preload
function preload($folder, &$files = array())
{
if (!is_dir($folder)) {
return null;
}
$handle = opendir($folder);
while (($file = readdir($handle)) !== false) {
if ($file != "." && $file != "..") {
$fullPath = $folder . DIRECTORY_SEPARATOR . $file;
if (is_dir($fullPath)) {
preload($fullPath, $files);
} else {
if (substr($file, strlen($file) - 4) == ".php") {
$files[] = $fullPath;
}
}
}
}
return $files;
}
示例3: preload
<?php
preload("AdminController");
admin_page("Pannello di amministrazione - Gestione gallery");
$gallery = call("gallery", "get");
start_admin_panel("/pannello_centrale", "Modifica gallery");
?>
<form name="form_modifica_gallery" action="/actions/gallery/modify.php" method="POST">
<?php
include_block("gallery/form_modifica_gallery", $gallery);
?>
<br />
<br />
<a href="/admin/gallery/">Annulla, torna all'elenco delle gallery</a>
<button type="submit">
<span>Salva modifiche</span>
</button>
<?php
Form::on_success("/admin/gallery/");
?>
<?php
Form::on_failure("/admin/gallery/modifica_gallery.php");
?>
</form>
<?php
end_admin_panel();
示例4: requireLogin
<?php
requireLogin();
useScript("validate-project.php");
preload(32, 32, "no.png");
preload(32, 32, "yes.png");
preload(32, 32, "loading.png");
$TITLE = "Oh noes!";
$CONTENT .= "\n<h1>So. You have a problem. Well whoopdie do. Don't we all</h1>\n<br />\n<br />\n<div id = 'images' ></div>\n<form action = '" . $SITE_PREFIX . "submit-bug.php' method = 'post' >\n\t<table>\n<tr>\n\t<td>What project is giving you crap?</td>\n\t<td><div id = 'project-ok' ><img src = '" . $SITE_PREFIX . "imgs/no.png' alt = '' /></div></td>\n\t<td><input type = 'text' id = 'project' name = 'project' size = '20' /></td>\n</tr>\n<tr>\n\t<td></td>\n\t<td></td>\n\t<td><div id = 'project-descr' > </div></td>\n</tr>\n<tr>\n\t<td>So, I need a poetic name for this issue</td>\n\t<td></td>\n\t<td><input type = 'text' name = 'title' size = '40' /></td>\n</tr>\n<tr>\n\t<td>And a nice description</td>\n\t<td></td>\n\t<td><textarea rows = '20' cols = '50' name = 'descr' ></textarea></td>\n</tr>\n<tr>\n\t<td></td>\n\t<td><img src = '" . $SITE_PREFIX . "imgs/32_space.png' alt = '' /></td>\n\t<td><input type = 'submit' value = 'Look, I made this for you!' /></td>\n</tr>\n\t</table>\n</form>\n";
示例5: preload
<?php
preload("AdminController");
preload("FoltersController");
admin_page("Gestione immagini - indice");
$path = Params::get("path");
preg_match("/\\//", $path, $matches);
$level = count($matches) - 1;
$elenco_cartelle = call("folders", "index", array("__filter_tipo__EQUAL" => "f_immagini", "__filter_path__BEGINS_WITH" => $folder_path, "__filter_level__EQUAL" => $level, "__filter_ordine__ORDER_ASCENDING" => null));
start_admin_panel("/pannello_centrale", "Gestione Immagini");
Flash::write_ok_messages();
Flash::write_warning_messages();
Flash::write_error_messages();
include "include/snippets/contenuti/base/__elenco_cartelle.php.inc";
include "include/snippets/contenuti/base/__elenco_immagini.php.inc";
end_admin_panel();