本文整理汇总了PHP中explore函数的典型用法代码示例。如果您正苦于以下问题:PHP explore函数的具体用法?PHP explore怎么用?PHP explore使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了explore函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: plug_philumsize
function plug_philumsize($p = '', $o = '')
{
$dr = $p ? $p : 'progb';
//_old/
$r = explore($dr, 'files', 1);
$nm = date('ym');
if ($r) {
foreach ($r as $k => $v) {
if ($v != '_trash.php') {
$f = $dr . '/' . $v;
$v = read_file($f);
$ret[nbf][$k] = substr_count($v, 'function ');
$ret[siz][$k] = filesize($f);
}
}
}
if ($ret[nbf]) {
$nbf = array_sum($ret[nbf]);
}
if ($ret[siz]) {
$siz = round(array_sum($ret[siz]) / 1024, 2);
}
//$exs=msql_read('system','program_sizes',$nm); if(!$exs)//eco($exs);
modif_vars('system', 'program_sizes', array(round($siz), $nbf), $nm);
$ret = ' ' . $nbf . ' functions / ' . $siz . ' Ko';
return $ret;
}
示例2: plug_dev2prod
function plug_dev2prod($p, $o)
{
$r = explore('progb', 'files', 1);
$old = '_old/' . date('ymd') . '/';
mkdir_r($old);
$olb = '_old/' . date('ym') . '/';
mkdir_r($olb);
foreach ($r as $k => $v) {
if ($v != '_trash.php') {
$fa = 'progb/' . $v;
$da = filemtime($fa);
$sa = filesize($fa);
$fb = 'prog/' . $v;
$db = filemtime($fb);
$sb = filesize($fb);
if (date('d') == '01') {
copy($fb, $olb . $v);
}
if ($sa != $sb or $da > $db) {
copy($fb, $old . $v);
copy($fa, $fb);
$ret .= strdeb($v, '.') . ' ';
}
}
}
return $ret;
}
示例3: ifrgz
function ifrgz($dr)
{
$r = explore($dr);
$f = 'users/public/ifr' . date('ymd') . '.tar';
if (!is_file($f)) {
$ret = plugin('tar', $f, $dr);
}
rmdir_r($dr);
return $ret;
}
示例4: pictos_see
function pictos_see($id)
{
$r = explore('imgb/icons/svg/noun');
asort($r);
foreach ($r as $k => $v) {
$im = svg('/noun/' . substr($v, 0, -4) . '§24') . ' ';
$ret .= ljb('popbt', 'jumpvalue', $id . '_noun/' . $v, $im) . ' ';
}
return divd('scroll', $ret);
}
示例5: find
function find()
{
header('Content-Type: text/html; charset=utf-8');
if (isset($_GET['type']) && $_GET['type'] != null && (isset($_GET['parameter']) && $_GET['parameter'] != null)) {
//echo "find aperto";
explore('https://www.mashape.com/explore' . switch_type($_GET['type']) . $_GET['parameter']);
} else {
$data = array('Error' => 'Erorr in Query');
echo json_encode($data);
}
}
示例6: sw
function sw($q)
{
switch ($q) {
case "find":
find();
break;
case "explore":
explore("https://www.mashape.com/explore");
break;
}
// print_r(error_get_last());
}
示例7: plug_dirsize
function plug_dirsize($p)
{
$dr = $p;
$r = explore($dr, 'files', 1);
if ($r) {
foreach ($r as $k => $v) {
if ($v != '_trash.php') {
$ret += filesize($dr . '/' . $v);
}
}
}
return round($ret / 1024);
}
示例8: plug_countfiles
function plug_countfiles($d)
{
$r = explore($d, 'files', 1);
if ($r) {
foreach ($r as $k => $v) {
if (is_array($v)) {
$ret += count($v);
} else {
$ret += 1;
}
}
}
return $ret;
}
示例9: plug_dir2table
function plug_dir2table($d, $p)
{
$r = explore($d);
//p($r);
list($dr, $nod) = split_right('/', $p, '');
if ($r) {
msql_modif($dr, $nod, msq_prep($r), array('src'), 'add', 'mdf');
}
$rb = msql_read($dr, $nod, '');
if (!$rb) {
return 'error';
}
//p($rb); //1d_array
return make_tables('', msq_prep($rb), $csa, $csb);
}
示例10: plug_photovr
function plug_photovr($p, $o)
{
//echo $p;
$dr = 'users/' . $p;
//echo $_SESSION['prmb'][27];
list($wa, $ha) = split('/', $_SESSION['prmb'][27]);
$wab = $ha * 2;
$hab = $wab * ($ha / $wa);
$r = explore($dr, 'files', 0);
//$rb=photok_batch($r,$dr,$ha,$wa,$hab,$wab);
$rb = photovr_batch($r, $dr, $wa, $ha, $wab, $hab);
if ($rb) {
$ret = implode($rb);
}
return $ret;
}
示例11: display_sub_dirs
function display_sub_dirs($current_dir, $sub_dirs)
{
$results = explore($current_dir, $sub_dirs, 1);
foreach ($results as $r) {
echo '<tr id = "row" data-file="' . $r[0] . '" data-type="dir">
<td id = "thumbnail_container" width = "14%"><div id = "thumbs">';
$is_dir = check_dir_exists($current_dir, $r[0]);
$margin = 10;
$img_id = 1;
foreach ($r[1] as $thumbs) {
$thumb_exists = false;
$thumb_exists = check_thumb_exists($current_dir . $r[0] . '/' . $thumbs);
$img_path = \OCP\Util::linkTo('reader', 'ajax/thumbnail.php') . '&filepath=' . urlencode($current_dir . $r[0] . '/' . rtrim($thumbs, 'pdf') . 'png');
$counter = 3;
for ($i = 1; $i <= $counter; $i++) {
echo '<img id = "' . $current_dir . $r[0] . '/' . $thumbs . '" src = "' . $img_path . '" value = "' . $thumb_exists . '" style = "position:absolute;top:-55px;left:10px;margin-left:' . $margin . 'px; z-index:' . (50 - $margin) . ';"/>';
$margin = $margin + 5;
$img_id = $img_id + 1;
}
}
echo '</div></td>';
echo '<td class = "filename svg" width = "86%">
<a class = "dirs" id = "' . $r[0] . '" href = "' . OCP\Util::linkTo('reader', 'index.php') . '&dir=' . $current_dir . $r[0] . '/' . '">
<span class = "nametext">' . htmlspecialchars($r[0]) . '</span>
</a>
<div id = "more_info" style = "color:#666;margin-left:15px;margin-top:35px; vertical-align:bottom">';
echo "Browse in for";
echo '<br>';
$dir_browse_results = explore($current_dir, array($r[0]), 5);
foreach ($dir_browse_results as $browse_result) {
foreach ($browse_result[1] as $each) {
$each_sub_dir = explode("/", $each);
if (count($each_sub_dir) > 1) {
foreach ($each_sub_dir as $element) {
echo '<span style = "color:#DDD;">>></span>' . $element;
}
} else {
echo '<span style = "color:#DDD;"> >></span>' . $each;
}
echo '<br>';
}
}
echo '</div>
</td>
</tr>';
}
}
示例12: ftp_j
function ftp_j($p, $o, $res = '')
{
list($p, $o) = ajxp($res, $p, $o);
//$p='/'.$p;
if ($p) {
ses('pp', $p);
}
$r = explore($p, '', 1);
//pr($r);
if ($r) {
foreach ($r as $k => $v) {
//p,v,f,t
$rb[$k] = array($p, $v, $p . '/' . $v, strdeb($v, '.'));
}
}
return ftp_render($rb);
}
示例13: explore
function explore($dir)
{
$html = '';
if (0 < count($content = glob($dir . '/*'))) {
$html .= '<ul>';
foreach ($content as $f) {
if ('_' != substr(basename($f), 0, 1)) {
$file = substr($f, strlen(PROJECT_PUBLIC));
if (!is_dir($f)) {
$html .= '<li><a href="' . $file . '">' . basename($file) . '</a></li>';
} else {
$html .= '<li>' . basename($file) . explore($f) . '</li>';
}
}
}
$html .= '</ul>';
}
return $html;
}
示例14: radio_build
function radio_build($dr, $nod)
{
$dr = 'users/' . ajx($dr, 1);
$sqdir = 'msql/radio/';
if (!is_dir($sqdir)) {
mkdir($sqdir);
}
$nod = $_SESSION['qb'] . '_radio' . $_SESSION['read'];
$file = $sqdir . $nod . '.php';
$ret['_menus_'] = array('prog', 'file', 'length', 'title', 'txt', 'img');
$r = explore($dr);
if ($r) {
foreach ($r as $k => $v) {
$ret[$k + 1] = array('0', $dr . '/' . $v, '0', $v, '', '');
}
}
save_vars($sqdir, $nod, $ret);
return ljb("popbt", "insert", '[' . $nod . ':radio]', "insert") . ' ';
}
示例15: detect_plugs
function detect_plugs()
{
$dr = 'plug/';
$r = msql_read('system', 'program_plugs', '', 1);
//p($r);
$rec = explore($dr, files, 1);
//p($rec);
foreach ($rec as $k => $v) {
$f = $dr . $v;
$vb = strdeb($v, '.');
$xt = xt($v);
$rc = $r[$vb];
$bo = detect_plugable($f, $vb);
$iface = $rc[4];
//?$rc[4]:detect_interface($f,$vb);
$pb = substr($v, 0, 1) == '_' ? '1' : '';
if (is_file($f) && $v && $vb && $xt == '.php') {
if (!$rc) {
$na++;
}
$rb[$vb] = array($rc[0], $rc[1], $bo ? $bo : '0', $rc[3], $iface, $rc[5], $pb);
}
//$vr,
if (is_file($f) && $v && $vb) {
$rd[$vb] = array($rc[0]);
}
}
//$rb=msq_reorder($rb);//p($rb);
ksort($rb);
//p($rf);
$rh = array('usage', 'dir', 'loadable', 'callable', 'interface', 'state', 'private');
//'vars',
msql_save('system', 'program_plugs', $rb, $rh);
//,'input','output'
///?msql=lang/eng/program_plugs&update==
update_table_lang($rd, 'program_plugs', 'fr', array('usage'));
update_table_lang($rd, 'program_plugs', 'eng', array('usage'));
return 'program_plugs: added:' . ($na ? $na : 0) . ', deleted:' . (count($r) - count($rb)) . br();
}