mirror of
				https://gitee.com/ledc/IYUUAutoReseed
				synced 2025-10-31 00:39:50 +00:00 
			
		
		
		
	增加客户端文件是否存在判断
This commit is contained in:
		| @@ -19,8 +19,11 @@ abstract class AbstractClient | ||||
|         $host = $config['host']; | ||||
|         $username = $config['username']; | ||||
|         $password = $config['password']; | ||||
|  | ||||
|         $className = "IYUU\Client\\" . $type . "\\" . $type; | ||||
|         $file = __DIR__ . DIRECTORY_SEPARATOR . $type . DIRECTORY_SEPARATOR . $type .'.php'; | ||||
|         if (!is_file($file)) { | ||||
|             die($file.' 文件不存在'); | ||||
|         } | ||||
|         $className = "\IYUU\Client\\" . $type . "\\" . $type; | ||||
|         if (class_exists($className)) { | ||||
|             echo $type." 客户端正在实例化!".PHP_EOL; | ||||
|             return new $className($host, $username, $password); | ||||
|   | ||||
		Reference in New Issue
	
	Block a user