本文整理汇总了PHP中elFinder::phpErrors方法的典型用法代码示例。如果您正苦于以下问题:PHP elFinder::phpErrors方法的具体用法?PHP elFinder::phpErrors怎么用?PHP elFinder::phpErrors使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类elFinder
的用法示例。
在下文中一共展示了elFinder::phpErrors方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: exec
//.........这里部分代码省略.........
}
}
// unlock session data for multiple access
if ($this->sessionCloseEarlier && $args['sessionCloseEarlier']) {
$this->session->close();
// deprecated property
elFinder::$sessionClosed = true;
}
if (substr(PHP_OS, 0, 3) === 'WIN') {
// set time out
elFinder::extendTimeLimit(300);
}
if (!is_array($result)) {
try {
$result = $this->{$cmd}($args);
} catch (Exception $e) {
$result = array('error' => htmlspecialchars($e->getMessage()), 'sync' => true);
}
}
// check change dstDir
$changeDst = false;
if ($dst && $dstVolume && (!empty($result['added']) || !empty($result['removed']))) {
$changeDst = true;
}
foreach ($this->volumes as $volume) {
$removed = $volume->removed();
if (!empty($removed)) {
if (!isset($result['removed'])) {
$result['removed'] = array();
}
$result['removed'] = array_merge($result['removed'], $removed);
if (!$changeDst && $dst && $dstVolume && $volume === $dstVolume) {
$changeDst = true;
}
}
$added = $volume->added();
if (!empty($added)) {
if (!isset($result['added'])) {
$result['added'] = array();
}
$result['added'] = array_merge($result['added'], $added);
if (!$changeDst && $dst && $dstVolume && $volume === $dstVolume) {
$changeDst = true;
}
}
$volume->resetResultStat();
}
// dstDir is changed
if ($changeDst) {
if ($dstDir = $dstVolume->dir($dst)) {
if (!isset($result['changed'])) {
$result['changed'] = array();
}
$result['changed'][] = $dstDir;
}
}
// call handlers for this command
if (!empty($this->listeners[$cmd])) {
foreach ($this->listeners[$cmd] as $handler) {
if (call_user_func_array($handler, array($cmd, &$result, $args, $this, $dstVolume))) {
// handler return true to force sync client after command completed
$result['sync'] = true;
}
}
}
// replace removed files info with removed files hashes
if (!empty($result['removed'])) {
$removed = array();
foreach ($result['removed'] as $file) {
$removed[] = $file['hash'];
}
$result['removed'] = array_unique($removed);
}
// remove hidden files and filter files by mimetypes
if (!empty($result['added'])) {
$result['added'] = $this->filter($result['added']);
}
// remove hidden files and filter files by mimetypes
if (!empty($result['changed'])) {
$result['changed'] = $this->filter($result['changed']);
}
if ($this->debug || !empty($args['debug'])) {
$result['debug'] = array('connector' => 'php', 'phpver' => PHP_VERSION, 'time' => $this->utime() - $this->time, 'memory' => (function_exists('memory_get_peak_usage') ? ceil(memory_get_peak_usage() / 1024) . 'Kb / ' : '') . ceil(memory_get_usage() / 1024) . 'Kb / ' . ini_get('memory_limit'), 'upload' => $this->uploadDebug, 'volumes' => array(), 'mountErrors' => $this->mountErrors, 'phpErrors' => elFinder::$phpErrors);
elFinder::$phpErrors = array();
foreach ($this->volumes as $id => $volume) {
$result['debug']['volumes'][] = $volume->debug();
}
}
foreach ($this->volumes as $volume) {
$volume->umount();
$volume->__destruct();
}
if (!empty($result['callback'])) {
$result['callback']['json'] = json_encode($result);
$this->callback($result['callback']);
} else {
return $result;
}
//TODO: Add return statement here
}