随笔分类 - PHP
            
    在Windows下为PHP安装redis扩展
    
            
            
        
摘要:1.使用phpinfo()函数查看PHP的版本信息,这会决定扩展文件版本 2.选择http://windows.php.net/downloads/pecl/snaps/redis/2.2.5/ http://windows.php.net/downloads/pecl/releases/igbin
        阅读全文
            
        
            
    PHP 的 HTTP 认证机制
    
            
            
        
摘要:PHP 的 HTTP 认证机制仅在 PHP 以 Apache 模块方式运行时才有效,因此该功能不适用于 CGI 版本。在 Apache 模块的 PHP 脚本中,可以用 header()函数来向客户端浏览器发送"Authentication Required"信息,使其弹出一个用户名/密码输入窗口。当
        阅读全文
            
        
            
    PHP获取站点根目录
    
            
            
        
摘要:最简单方式:$_SERVER['DOCUMENT_ROOT'],暴力通俗易懂,网站根目录,GG. 将下面的代码放在网站根目录下的一个文件中,以便在其它文件中引用。 路径方式: define('BASE_PATH',str_replace('\\','/',realpath(dirname(__FIL
        阅读全文
            
        
            
    数据库中的左连接(left join)和右连接(right join)区别
    
            
            
        
摘要:Left Join / Right Join /inner join相关关于左连接和右连接总结性的一句话:左连接where只影向右表,右连接where只影响左表。Left Joinselect * from tbl1 Left Join tbl2 where tbl1.ID = tbl2.ID左连接
        阅读全文
            
        
            
    php中点击网页不跳转执行程序
    
            
            
        
摘要:if($code['result_code'] !='FAIL') { echo ""; //echo "退款成功"; ; }else{ echo ""; }
        阅读全文
            
        
            
    curl常用功能
    
            
            
        
摘要:1 'beauty', "upload"=>"@a.zip"); 14 curl_setopt($ch, CURLOPT_POST, 1); 15 curl_setopt($ch, CURLOPT_POSTFIELDS, $data); 16 //**************************************************************************...
        阅读全文
            
        
            
    PHP 页面编码声明方法详解(header或meta)
    
            
            
        
摘要:2 php的header来定义一个php页面为utf编码或GBK编码 3 4 php页面为utf编码 5 header("Content-type: text/html; charset=utf-8"); 6 7 php页面为gbk编码 8 header("Content-type: text/html; charset=gb2312"); 9 10 php页面为...
        阅读全文
            
        
            
    php变量与数组相互转换的方法(extract与compact
    
            
            
        
            
        
摘要:1 #php变量与数组相互转换的方法(extract与compact) 2 3 #compact 多个变量转数组 4 $name = 'sui'; 5 $email = 'sui@qq.com'; 6 $arr = compact('name','email'); 7 print_r($arr); 8 9 #extract 数组转多个变量 10 //数组转多个变量 11 $...
        阅读全文
            
        
            
    file_put_contents保存数据,
    
            
            
        
摘要:file_put_contents("sui.txt", var_export($now_member,TRUE),FILE_APPEND); 可以保存数组,方便调试
        阅读全文
            
        
            
    PHP中多态,抽象类,接口,
    
            
            
        
摘要:小例子: 需求:公司定义一个接口让我们开发功能 usb.interface.php: store.class.php: mouse.class.php: key.class.php: 使用:computer.class.php
        阅读全文
            
        
            
    PHPMySQL 中 pdo文件的增删改查
    
            
    
摘要:1 query('select user_name,user_id,email from dsc_admin_user') as $v) { 9 print_r($v['user_name'].'~~~~~~~~~~~~~~~~~'.$v['email']); 10 echo ""; 11 }*/ 12 13 /*$sql = "insert...
        阅读全文
            
        
 
                    
                 
 浙公网安备 33010602011771号
浙公网安备 33010602011771号