當前位置: 首頁>>代碼示例>>PHP>>正文


PHP elFinder::phpErrors方法代碼示例

本文整理匯總了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
 }
開發者ID:nao-pon,項目名稱:xelfinder,代碼行數:101,代碼來源:elFinder.class.php


注:本文中的elFinder::phpErrors方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。