예제 #1
0
파일: Debug.php 프로젝트: minutephp/debug
 public function opcache()
 {
     if (!file_exists($this->opcache)) {
         $this->browser->download('https://raw.githubusercontent.com/rlerdorf/opcache-status/master/opcache.php', $this->opcache);
     }
     try {
         include_once $this->opcache;
     } catch (\Throwable $e) {
     }
     exit(0);
 }
예제 #2
0
파일: Client.php 프로젝트: minutephp/admin
 public function getPackages()
 {
     if ($satis = $this->browser->getUrl(self::PLUGIN_URL . 'packages.json')) {
         if ($json = json_decode($satis, true)) {
             foreach ($json['includes'] as $url => $sha) {
                 if ($data = $this->browser->getUrl(self::PLUGIN_URL . $url)) {
                     if ($satis = json_decode($data, true)) {
                         foreach ($satis['packages'] as $name => $data) {
                             $package = end($data);
                             $packages[] = ['name' => $package['name'], 'src' => $package['source']['url'], 'version' => $package['version_normalized'], 'description' => $package['description'], 'keywords' => $package['keywords']];
                         }
                     }
                 }
             }
         }
     }
     return $packages ?? [];
 }