PHP封装的简单连接MongoDB类示例
PHP封装的简单连接MongoDB类。具体如下: 1. 封装MongoDB类 <?php class MongoDB { private $database; private $mongo; function __construct() { $this->mongo = new MongoClient('mong...
PHP从尾到头打印链表实例讲解
题目 输入一个链表,从尾到头打印链表每个节点的值。 题解 一种是使用栈。 第二种是递归。 代码 //递归版本 function printListFromTailToHead($head) { if($head == NULL){ return []; } $arr ...
Nginx伪静态配置和常用Rewrite伪静态规则集锦
Nginx伪静态配置主要是通过Rewrite规则来实现的,这里总结些常用的Rewrite规则: 1. 隐藏index.php rewrite ^/index\.php(.*)$ /$1 last; 2. 移除末尾的html后缀 rewrite ^/(.+)\.html$ /$1 last;...




