我一直忘了PHP内置服务器的正确命令行语法,因此现在在.profile中为其做了一个别名:
alias phps='php -S 0.0.0.0:8888'
现在,我可以简单地键入:phps public / index.php来启动内置的Web服务器。
xmlrpc协议是通过http请求xml数据进行通信。webservice中和它相同的是soap。soap调用的确很简单,但是创建wsdl太繁琐,效率低下。xmlrpc很好的解决这个问题。(1).创建xmlrpc服务端(求和函数api)function getSum($method,$ar...
<?php /** * @throws Exception */ function curl() { throw new \Exception('err...
当我想在一个进程中监听kill 和 kill -9命令报了这个错误。//监听kill pcntl_signal(SIGTERM, function () { posix_kill(0, SIGTERM); });...
将jsonp转为PHP数组和对象。/** * jsonp转数组|Jsonp转json * @param string $jsonp jsonp字符串 * @param bool $as...
为什么使用队列?因为pop取队列具有原子性。假如我们需要秒杀一个商品id,我们先将商品的库存保存到一个队列。例如:<?php $redis = new Redis(); $redis->connect('127.0.0.1', 6...
【一】.基本用法首先看看官方对send方法的解释:Sets the return value of the yield expression and resumes the generato...