关于php与mysql之间的工作机制,今天蛋疼地考虑php编译安装时不添加--with-mysql参数,是否可以实现mysql_connect()函数。第一次编译只是简单的./configure --prefix=/usr/local/php --with-config-file-path=/usr/local/php/etc
make &&             
                
                    
                        
                                                            
                                                                        
                                                                                        原创
                                                                                    
                            2014-05-23 17:39:35
                            
                                10000+阅读
                            
                                                                             
                 
                
                             
         
            
            
            
            SPL(Standard PHP Library)简介php5以后的版本引入了SPL(Standard PHP Library)。这个库定义了很多有用的接口和类以及少量函数(例如spl_autoload),功能非常强大。大家可以通过 print_r(spl_classes());来打印出自己的php版本所支持的所有spl类和接口。目前已经有不少项目(例如ZF)应用了spl,所以学习spl是很有必要            
                
                    
                        
                                                            
                                                                        
                                                                                        转载
                                                                                            精选
                                                        
                            2016-03-29 16:53:11
                            
                                731阅读
                            
                                                                             
                 
                
                             
         
            
            
            
            需要重新安装zlib拓展 解决方法:make clean 然后重新phpize,configure --with-php-config=,make,make install走安装流 具体操作 ...            
                
                    
                        
                                                            
                                                                        
                                                                                        转载
                                                                                    
                            2021-10-11 10:38:00
                            
                                973阅读
                            
                                                                                    
                                2评论
                            
                                                 
                 
                
                             
         
            
            
            
            使用PHPExcel类读取Excel2007时出现'ZipArchivelibraryisnotenabled解决方法详细错误信息:Fatalerror:Uncaughtexception'Exception'withmessage'ZipArchivelibraryisnotenabled'in是由于缺少PHP的zip模块导致,收到安装即可。windows下:解决方法:在php.ini文件中开启            
                
                    
                        
                                                            
                                                                        
                                                                                        原创
                                                                                    
                            2013-09-14 17:24:38
                            
                                2205阅读
                            
                                                        
                                点赞
                            
                                                                                    
                                1评论
                            
                                                 
                 
                
                             
         
            
            
            
            <?php// 验证码类class p_w_picpath {    protected $im;    protected $img_width;    protected $img_height;    protected $img_type;                   
                
                    
                        
                                                            
                                                                        
                                                                                        原创
                                                                                    
                            2014-07-14 00:47:32
                            
                                327阅读
                            
                                                                             
                 
                
                             
         
            
            
            
            PHP Warning: PHP Startup: unable to load dynamic library            
                
                    
                        
                                                            
                                                                        
                                                                                        原创
                                                                                    
                            2012-04-15 20:49:49
                            
                                1177阅读
                            
                                                                             
                 
                
                             
         
            
            
            
            上传类库<?phpclass upload {    protected $allowExt = array('jpg','jpeg','gif','png','bmp');    protected $allowSize = 1; // 最大上传大小,单位为M    protected $errno = 0;  &nbs            
                
                    
                        
                                                            
                                                                        
                                                                                        原创
                                                                                    
                            2014-07-13 00:49:35
                            
                                387阅读
                            
                                                                             
                 
                
                             
         
            
            
            
            Project page: http://www.google.com/recaptcha/Repository: https://github.s a free CAPTCHA serv...            
                
                    
                        
                                                            
                                                                        
                                                                                        原创
                                                                                    
                            2015-06-25 02:18:20
                            
                                143阅读
                            
                                                                             
                 
                
                             
         
            
            
            
            在php中使用mongodb你必须使用 mongodb的php驱动。 MongoDB PHP在各平台上的安装及驱动包下载请查看:PHP安装MongoDB扩展驱动 确保连接及选择一个数据库 为了确保正确连接,你需要指定数据库名,如果数据库在mongoDB中不存在,mongoDB会自动创建 代码片段如下            
                
                    
                        
                                                            
                                                                        
                                                                                        原创
                                                                                    
                            2018-02-21 00:59:00
                            
                                435阅读
                            
                                                                             
                 
                
                             
         
            
            
            
            windows上安装mongodb的php扩展 下载地址https://s3.amazonaws.com/drivers.mongodb.org/php/index.html 找到对应的php版本的dll文件,下载php_mongo.dll,放到php安装目录下的ext目录中,修改php.ini,添            
                
                    
                        
                                                            
                                                                        
                                                                                        原创
                                                                                    
                            2021-06-17 19:20:00
                            
                                727阅读
                            
                                                                             
                 
                
                             
         
            
            
            
            解决方法:make clean 然后重新phpize,configure --with-php-config=,make,make install走安装流 1.进入zlib拓展路径cd /usr/local/php-7.3.29/ext/zlib/执行make clean 2.运行phpize,执行 ...            
                
                    
                        
                                                            
                                                                        
                                                                                        转载
                                                                                    
                            2021-10-11 10:48:00
                            
                                563阅读
                            
                                                                                    
                                2评论
                            
                                                 
                 
                
                             
         
            
            
            
            WorldCat Search API1. 申请 WSKey : h下载php类:http://www.jaredhowland.com/OCLC/用法:...            
                
                    
                        
                                                            
                                                                        
                                                                                        原创
                                                                                    
                            2023-05-12 22:00:03
                            
                                300阅读
                            
                                                                             
                 
                
                             
         
            
            
            
               1.为本地PHP环境添加MongoDB的扩展,从https://github.com/mongodb/mongo-php-driver/downloads下载压缩文件并解压,结果如下:
   2.根据本地环境将对应的dll文件复制到ext目录中;
   3.在php.ini文件中新增extension=php_mongo.d            
                
                    
                        
                                                            
                                                                        
                                                                                        原创
                                                                                    
                            2012-08-24 18:15:11
                            
                                923阅读
                            
                                                                             
                 
                
                             
         
            
            
            
            <?phperror_reporting(7);$conn = new Mongo();$db = $conn->PHPDataBase;$collection = $db->PHPCollection;/*----------------------------- * 删除 *-----------------------------$collection->remove(array("name" => "xixi111"));*//*------------------------------ * 插入 *-------            
                
                    
                        
                                                            
                                                                        
                                                                                        原创
                                                                                    
                            2021-08-05 15:58:33
                            
                                112阅读
                            
                                                                             
                 
                
                             
         
            
            
            
            php连接mongodbwget 'https://codeload.github.com/mongodb/mongo-php-driver/zip/master' -O /usr/local/src/mong_php.zipcd /usr/local/src/unzip mong_php.zipcd mongo-php-driver-master//usr/local/php/bin/phpiz            
                
                    
                        
                                                            
                                                                        
                                                                                        原创
                                                                                    
                            2016-06-12 14:33:55
                            
                                570阅读
                            
                                                                             
                 
                
                             
         
            
            
            
            test; $collection = $db->user; //for ($i = 0;$i$i, // 'name'=>$str, // 'age'=>rand(1,100) // ]; // $collection->insert($arr); // //} $query = array('id'=>array('$lt'=>100)); $cu...            
                
                    
                        
                                                            
                                                                        
                                                                                        转载
                                                                                    
                            2016-12-16 17:00:00
                            
                                81阅读
                            
                                                                                    
                                2评论
                            
                                                 
                 
                
                             
         
            
            
            
            PHP 想要往 MongoDB 里增删查改数据,需要先安装 mongodb 或 mongo 扩展模块,一般两个都装上: 测试 PHP 是否能连接并操作 MongoDB:            
                
                    
                        
                                                            
                                                                        
                                                                                        转载
                                                                                    
                            2019-03-04 12:23:00
                            
                                52阅读
                            
                                                                             
                 
                
                             
         
            
            
            
            前面有篇文章介绍了MongoDB安装使用:http://msiyuetian.blog.51cto.com/8637744/1720559 下面这篇文章主要来介绍PHP怎么来连接MongoDB,在进行试验之前先安装PHP,我这里是基于LAMP环境下做的测试。1、下载安装php的mongo扩展[root@centos ~]# cd /usr/local/src/[root@centos src]#            
                
                    
                        
                                                            
                                                                        
                                                                                        原创
                                                                                            精选
                                                        
                            2016-01-09 16:20:48
                            
                                1368阅读
                            
                                                        
                                点赞
                            
                                                                                    
                                1评论
                            
                                                 
                 
                
                             
         
            
            
            
            wget 'https://pecl.php.net/get/mongo-1.6.9.tgz' -O /usr/local/src/mong_php.zipcd /usr/local/src/tar zxvf mong_php.zipcd /usr/local/src/mongo-1.6.9/usr/local/php/bin/phpize./configure --with-php-c            
                
                    
                        
                                                            
                                                                        
                                                                                        原创
                                                                                    
                            2016-07-12 17:01:32
                            
                                526阅读
                            
                                                                             
                 
                
                             
         
            
            
            
            PHPDataBase;$collection = $db->PHPCollection;/*----------------------------- * 删除 *-----------------------------$collection->remove(array("name" => "xixi111"));*//*------------------------------ * 插入 *------------------------------for($i = 0;$i "xixi".$i,"            
                
                    
                        
                                                            
                                                                        
                                                                                        原创
                                                                                    
                            2021-07-26 17:55:43
                            
                                108阅读