随笔分类 - php
摘要:tp6使用MongoDB需要配置复制集: 配置方法链接 将单节点转为复制集 — MongoDB Manual 3.4 (mongoing.com) tp6数据库配置文件内容: database.conf 'mongodb'=>[ // 数据库类型 'type' => 'mongo', // 服务器地
阅读全文
摘要:用于centos7的php7 workerman环境 1.安装libevent和event扩展 yum install libevent -y yum install libevent-devel -y pecl install event 2.查看php配置文件位置 php --ini 3.添加
阅读全文
摘要:到项目目录然后运行指令 php public/index.php api/index/test 带参数运行 php public/index.php api/index/test --test1=1 --test2=2 解析参数 public function test() { $argv = $_
阅读全文
摘要:常量是一个简单的标识符。在脚本执行期间该值不能改变(除了所谓的魔术常量,他们其实不是常量)。常量默认大小写敏感。通常常量标识符总是大写的。 可以用define()函数来定义常量。在php5.3.0以后,可以使用const关键字在类定义的外部定义常量,先前版本const关键字只能在类(class)中使
阅读全文
摘要:array_column — 返回数组中指定的一列 说明 array_column ( array $input , mixed $column_key [, mixed $index_key = null ] ) : array array_column() 返回input数组中键值为column
阅读全文
摘要:$ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $linkUrl); curl_setopt($ch, CURLOPT_VERBOSE, 1); curl_setopt($ch, CURLOPT_FAILONERROR, false); curl_s
阅读全文

浙公网安备 33010602011771号