腾讯云控制台,选择你的云服务器,重装系统,服务市场,选择适合的镜像,https://oneinstack.com/docs/我选择这家的,系统装好后,整个web环境自带的,用公网ip访问你的主机,手册上按步骤操作,基本可以搭建你的网站
server:class Server{ private $_serv = null; private $_e = null; public function __construct() { $this->_serv = new swo
server:class Server{ private $_serv = null; private $_workers = []; private $_worker_num = 2; public function __construct() { &n
$workers = [];$worker_num = 2;for($i = 0; $i < $worker_num; $i++){ $process = new swoole_process('callback_function',false,false); $process->useQueue(); $p
function write_callback($file, $writen){ echo "write $file [$writen]\n"; return true;}for ($i = 0; $i < 1; $i++){ swoole_async_write("data.txt", str_repeat('A
server:$serv = new swoole_server('127.0.0.1', 9502);$serv->on('receive', function ($serv, $fd, $from_id, $data) { $serv->tick(3000, function() use($serv, $fd) {
server:$ws = new swoole_websocket_server('0.0.0.0', 9502);$ws->on('open', function ($ws, $request) { var_dump($request->fd, $request->get, $request->server); $ws-
https://github.com/chenchaojie/Swoole/tree/master/AsyncClientE:\code\SwooleExample\AsyncClient\Client.phpE:\code\SwooleExample\AsyncClient\Server.php
配置phpstorm 当你写swoole 类或者函数时会自动补全 https://github.com/swoole/ide-helper.git 克隆下这个工具包点加+,然后指定你下载好的工具包路径,点ok
command shift a 或 Ctrl+Shift+a keymap typo breakcrumbsCode Foldingmethod separatorsAlt+1 或 command+1 show right margin
https://github.com/nrk/redis-lua/ http://www.cnblogs.com/huangxincheng/p/6230129.html https://redis.io/commands/eval https://segmentfault.com/a/1190000003509917 使用XHProf
根目录下新建一个public 目录E:\code\yaf_demo\public\index.php index.php移动到public 目录下define('APPLICATION_PATH', dirname(__DIR__));E:\code\yaf_demo\testing测试的入口(做单元测试时用例放这里)E:\code\yaf_demo\application\libr
E:\code\yaf_demo\application\modules\User\controllers\User.php showAction$userModel = new UserModel();echo $userModel->getUserInfo($userId);E:\code\yaf_demo\application\models\User.phppublic f
$get = $this->getRequest()->getQuery();$post = $this->getRequest()->getPost();$file = $this->getRequest()->getFiles();echo $this->getRequest()->get('title');$this->getReques
http://yaf_demo.com/index/index/showapplication/views/index/show.phtmlhttp://yaf_demo.com/user/user/index application/modules/User/views/user/index.phtmlreturn false 不渲染视图,默认渲染在bootstrap.php 全局禁用_init
有些php框架通过path info 进行路由nginx 需指定path info 的配置yaf 通过$_SERVER['REQUEST_URI']路由http://yaf_demo.com/user/user/show/userId/100 $params = $this->getRequest()->getParams();默认的路由这上面这样yaf支持5种路由形式E:\code\
http://yaf_demo.com/index/index/index 模块/控制器/动作/modules/controller/actionE:\code\demo\application\controllers\User.phphttp://yaf_demo.com/index/user/index application.modules = "Index,User"
------https://github.com/chenchaojie---- ---https://github.com/JanHuang----- -----https://github.com/LinkedDestiny----- -----https://github.com/kcloze---
http://yaf.laruence.com/manual/yaf.config.optional.htmlyaf有全局类库和本地类库之分yaf.library = "/data/webroot/libs" (全局类库在php.ini配置) application.library (本地类库是在application.ini 配置)
前提是安装好yaf扩展cd /home/skinglzw/Downloads/yaf/tools/cg//usr/local/php/bin/php yaf_cg democd output/ 这个目录下会生成一个demomv demo /data/www/yaf 集成ide 设置 php include pathshttps://github.com/elad
请先在linux安装phpwget http://cn2.php.net/distributions/php-7.1.6.tar.gz解压进入php源码(php源码里扩展挺全的)cd /home/linzw/Downloads/php-7.1.6/ext/pdo (pdo就是你要安装的扩展)/usr/local/php/bin/phpize (要找到你安装好的p
如果你希望看到C语言级别的php代码就需要使用strace这个默认是安装了的,如果没有安装可以#yum install strace查看httpd进程(无web服务器需装一个)#ps auxw | grep httpd 有多个,必须停止apache[root@localhost usr]# /usr/local/webserver/apache2/bin/apachectl stop&
需要分析PHP代码的性能,或者说实现同样功能的代码到底哪个更好呢?或者说想知道底层的实现可以使用VLD查看opcode下载与安装VLD# wget http://pecl.php.net/get/vld-0.11.2.tgz# tar zxvf vld-0.11.2.tgz# cd ./vld-0.11.2# /usr/local/php/bin/phpize &nbs
valgrind 介绍Valgrind是一套Linux下,开放源代码(GPL V2)的仿真调试工具的集合。Valgrind由内核(core)以及基于内核的其他调试工具组成。内核类似于一个框架(framework),它模拟了一个CPU环境,并提供服务给其他工具;而其他工具则类似于插件 (plug-in),利用内核提供的服务完成各种特定的内存调试任务。Valgrind包括如下一些工具:Memcheck
centos6.8 我之前在系统上安装了php7还有swoole扩展可以用命令查看扩展有没有装好php -i|grep swoole (没装的直接看我之前文章吧,或者留言我告诉你怎么装)git clone https://github.com/shenzhe/zphp.git(克隆框架下来)cd zphpphp build.php(构建项目)pls enter app pat
安装必要的工具rpm -qa|grep libxml2 查看下工具是不是有装yum list | grep libxml2yum install libxml2-devel (centos 必须安装)ubuntu/debian:apt-get install libxml2-devapt-get install autoconf//yum install libxml2yum inst
centos 6.81,安装gccyum -y install gcc make autoconf2,下载最新版php源码打开eclipse->file ->new -> c project项目下有个重要的工具,php-src/ext/ext_skel(自动为我们创建扩展的脚本)./ext_skel --extname=test(创建名叫test的新扩展) c
centos 上用yum安装php版本太低了是5.3的,所以要更新下yum源配置yum源追加CentOS 6.8的epel及remi源。# rpm -Uvh http://ftp.iij.ad.jp/pub/linux/fedora/epel/6/x86_64/epel-release-6-8.noarch.rpm# rpm -Uvh http://rpms.famillecollet.com/e
Copyright © 2005-2024 51CTO.COM 版权所有 京ICP证060544号