ZBlogException::ResumeErrorHook PHP Method

ResumeErrorHook() public static method

恢复错误调度
public static ResumeErrorHook ( )
    public static function ResumeErrorHook()
    {
        if (self::$_isdisable === null) {
            return;
        }
        self::$isdisable = self::$_isdisable;
        self::$_isdisable = null;
    }

Usage Example

Example #1
0
 /**
  * 解开应用包
  * @param $xml
  * @return bool
  */
 public static function UnPack($xml)
 {
     global $zbp;
     $xml = simplexml_load_string($xml);
     if (!$xml) {
         return false;
     }
     if ($xml['version'] != 'php') {
         return false;
     }
     $type = $xml['type'];
     $id = $xml->id;
     $dir = $zbp->path . 'zb_users/' . $type . '/';
     ZBlogException::SuspendErrorHook();
     if (!file_exists($dir . $id . '/')) {
         @mkdir($dir . $id . '/', 0755, true);
     }
     foreach ($xml->folder as $folder) {
         $f = $dir . $folder->path;
         if (!file_exists($f)) {
             @mkdir($f, 0755, true);
         }
     }
     foreach ($xml->file as $file) {
         $s = base64_decode($file->stream);
         $f = $dir . $file->path;
         @file_put_contents($f, $s);
         if (function_exists('chmod')) {
             @chmod($f, 0755);
         }
     }
     ZBlogException::ResumeErrorHook();
     return true;
 }
All Usage Examples Of ZBlogException::ResumeErrorHook