/ Published in: PHP
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
<?php class Shell { private static $singleton; public static function singleton() { $c = __CLASS__; self::$singleton = new $c; } return self::$singleton; } private $dir_temp; private function __construct() { } public function __clone() { } public function temp($file = '') { return $this->dir_temp . $file; } public function out($text = '') { echo ($text ? 'true' : 'false') . "\n"; } else { $this->dump($text); } } public function dump($obj = false) { } public function nircmd($cmd) { $this->out("[nircmd] $cmd"); } public function concmd_utf8($data, $src_encoding) { $cmd = "concmd /i:$src_encoding /o:UTF8 /f:T \"$path\""; $this->out("[concmd] $cmd"); return $data; } public function touch_file($path) { return $path; } public function touch_dir($path) { return $path; } } ?>