芝麻web文件管理V1.00
编辑当前文件:/home/qrafawbu/portpulselogistics.com/Modules/Cargo/Http/Helpers/ShipmentPRNG.php
key)->count(); return ($count > 0)?true:false; } private function generatePRNG() { $code = ''; for($n = 0; $n < ShipmentSetting::getVal('shipment_code_count'); $n++){ $code .= '0'; $this->max = $this->max.'9'; } $rand = rand($this->min, (int)$this->max); $code = substr($code, 0, -strlen($rand)); return $code.$rand; } private function createKey() { $this->key = $this->generatePRNG(); $exist = $this->checkExist(); return (!$exist)?$this->key:$this->createKey(); } static public function get() { $instanse = new ShipmentPRNG; return $instanse->createKey(); } }