Browse Source

fix error, dpcli to cli

stanley-king 1 năm trước cách đây
mục cha
commit
2cd083fcea

+ 1 - 1
crontab/index.php

@@ -17,7 +17,7 @@ require_once(BASE_ROOT_PATH . '/helper/img_helper.php');
 require_once(BASE_ROOT_PATH . '/helper/exceptionex.php');
 require_once(BASE_ROOT_PATH . '/helper/notify_helper.php');
 
-if (php_sapi_name() == 'dpcli') {
+if (php_sapi_name() == 'cli') {
     $_GET['act'] = $_SERVER['argv'][1];
     $_GET['op'] = empty($_SERVER['argv'][2]) ? 'index' : $_SERVER['argv'][2];
 }

+ 1 - 1
data/api/xs/lib/XS.php

@@ -492,7 +492,7 @@ class XS extends XSComponent
 			if (function_exists('apc_fetch')) {
 				$cache = apc_fetch($cache_key);
 				$cache_write = 'apc_store';
-			} elseif (function_exists('xcache_get') && php_sapi_name() !== 'dpcli') {
+			} elseif (function_exists('xcache_get') && php_sapi_name() !== 'cli') {
 				$cache = xcache_get($cache_key);
 				$cache_write = 'xcache_set';
 			} elseif (function_exists('eaccelerator_get')) {

+ 1 - 1
data/api/xs/util/XSDataSource.class.php

@@ -31,7 +31,7 @@ abstract class XSDataSource
 	{
 		$this->type = $type;
 		$this->arg = $arg;
-		$this->inCli = php_sapi_name() === 'dpcli';
+		$this->inCli = php_sapi_name() === 'cli';
 		$this->init();
 	}
 

+ 1 - 1
test/coroutine/udp_client.php

@@ -26,7 +26,7 @@ class Client
     {
         $cli = new swoole_client_coro(SWOOLE_SOCK_UDP);
         $ret = $cli->connect($this->ip, self::PORT);
-        $cli->send("sent by dpcli");
+        $cli->send("sent by cli");
 
         $cli2 = new swoole_client_coro(SWOOLE_SOCK_UDP);
         $ret = $cli2->connect($this->ip, self::PORT);

+ 1 - 1
test/coroutine/udp_tcp_timeout.php

@@ -78,7 +78,7 @@ class TestHttpServer {
 			//error_log(" tcp dpcli get rsp == " . print_r($ret, true) . PHP_EOL, 3, '/data/log/udp_timeout.log');
 		}
 		else{
-			error_log(" tcp dpcli timeout \n",3, '/data/log/udp_timeout.log');
+			error_log(" tcp cli timeout \n",3, '/data/log/udp_timeout.log');
 		}
 
 		$response ->end(" swoole response is ok");