随笔分类 -  PHP

1
摘要:安装前请务必确保已经正确安装了 PHP。打开命令行窗口并执行 php -v 查看是否正确输出版本号。 开始安装前需要把open_ssl扩展打开 打开命令行并依次执行下列命令安装最新版本的 Composer: 执行第一条命令下载下来的 composer-setup.php 脚本将简单地检测 php.i 阅读全文
posted @ 2017-06-27 21:01 屌丝IT男 阅读(492) 评论(0) 推荐(0) 编辑
摘要:在此之前,请先在window7上搭建apache-ftp服务器,请查看文章:Windows 上搭建Apache FtpServer test.php 阅读全文
posted @ 2017-01-08 16:34 屌丝IT男 阅读(339) 评论(0) 推荐(0) 编辑
摘要:test.php 相当于打开了百度首页 阅读全文
posted @ 2017-01-05 21:28 屌丝IT男 阅读(2373) 评论(0) 推荐(0) 编辑
摘要:有些配置化的数据放到配置文件可以方便管理,比如数据库信息,路由信息,先建立配置文件,test.ini 操作ini的php文件,test.php 结果: 这样就能用二维数组取出配置信息了 阅读全文
posted @ 2017-01-05 21:15 屌丝IT男 阅读(433) 评论(0) 推荐(0) 编辑
摘要:setAttribute(PDO::ATTR_ERRMODE,PDO::ERRMODE_EXCEPTION); $stmt=$dbh->prepare($sql); $stmt->bindParam(':status',$status); $stmt->execute(); //返回插入、更新、删除的受影响行数 // echo $stmt->rowCou... 阅读全文
posted @ 2017-01-01 20:56 屌丝IT男 阅读(8300) 评论(0) 推荐(0) 编辑
摘要:在php程序编写中,flush()的使用率还是挺高的,它在网页表现即时信息效果时发挥了极为重要的作用,比如之前写的php实现限制文件下载速度的代码实例,flush()就起了举足轻重的作用,是进度条实现代码里的关键语句。 关于flash()的解释 语法: flush(); 作用: 刷新PHP程序的缓冲 阅读全文
posted @ 2016-08-05 21:18 屌丝IT男 阅读(3589) 评论(1) 推荐(0) 编辑
摘要:这个错误说明虚拟主机不支持PHPMailer默认调用的fsockopen函数,找到class.smtp.php文件,搜索fsockopen,就找到了这样一段代码: 首先,在php.ini中去掉下面的两个分号 ;extension=php_sockets.dll ;extension=php_open 阅读全文
posted @ 2016-07-13 21:51 屌丝IT男 阅读(625) 评论(0) 推荐(0) 编辑
摘要:首先,要下载php_mail软件包 核心代码: index.php mail.php 效果: 阅读全文
posted @ 2016-07-13 21:43 屌丝IT男 阅读(9142) 评论(1) 推荐(0) 编辑
摘要:$proCur) { $randNum = mt_rand(1, $proSum); if ($randNum array('id'=>1,'prize'=>'平板电脑','v'=>1), '1' => array('id'=>2,'prize'=>'数码相机','v'=>5), '2' => array('id'=>3,'prize'... 阅读全文
posted @ 2016-07-11 21:32 屌丝IT男 阅读(208) 评论(0) 推荐(0) 编辑
摘要:upload.php handle.php 效果: 阅读全文
posted @ 2016-07-10 17:20 屌丝IT男 阅读(5393) 评论(0) 推荐(1) 编辑
摘要:import.php 效果图: 阅读全文
posted @ 2016-07-10 14:45 屌丝IT男 阅读(230) 评论(0) 推荐(0) 编辑
摘要:效果: 阅读全文
posted @ 2016-07-06 21:03 屌丝IT男 阅读(398) 评论(0) 推荐(0) 编辑
摘要:首先是客户端执行方法ApiModel.php: 客户端调用方法,可以在此配置基本信息api.php: 服务器的接口函数test.php: 阅读全文
posted @ 2016-07-03 17:49 屌丝IT男 阅读(22937) 评论(0) 推荐(0) 编辑
摘要:方法:static public function getChildren($data,$pid){ $arr=array(); foreach ($data as $v) { if ($v['pid']==$pid) { ... 阅读全文
posted @ 2016-01-10 16:16 屌丝IT男 阅读(749) 评论(0) 推荐(0) 编辑
摘要:方法:static public function getParents($data,$id){ $arr=array(); foreach ($data as $v) { if ($v['id']==$id) { $a... 阅读全文
posted @ 2016-01-10 15:59 屌丝IT男 阅读(810) 评论(0) 推荐(0) 编辑
摘要:方法代码: static public function unlimitedForLayer($data,$pid=0){ $arr=array(); foreach ($data as $v) { if ($v['pid']==$pid) {... 阅读全文
posted @ 2016-01-10 15:37 屌丝IT男 阅读(521) 评论(0) 推荐(0) 编辑
摘要:在Home模块下建一个Clas文件夹,里面建一个Cate.class.php类文件,类文件代码:php代码如下:array( 'id'=>1, 'pid'=>0 ), ... 阅读全文
posted @ 2016-01-10 14:55 屌丝IT男 阅读(852) 评论(0) 推荐(0) 编辑
摘要:'tanteng' // 'password' => 'password' ); $ch = curl_init (); // print_r($ch); curl_setopt ( $ch, CURLOPT... 阅读全文
posted @ 2016-01-06 22:49 屌丝IT男 阅读(197) 评论(0) 推荐(0) 编辑
摘要:HP QR Code是一个PHP二维码生成类库,利用它可以轻松生成二维码,官网提供了下载和多个演示demo,查看地址:http://phpqrcode.sourceforge.net/下载官网提供的类库后,只需要使用phpqrcode.php就可以生成二维码了,当然您的PHP环境必须开启支持GD2。... 阅读全文
posted @ 2015-12-16 21:04 屌丝IT男 阅读(225) 评论(0) 推荐(0) 编辑
摘要:Array(0 => Array(bid => 41,brealname => 'we教官',cid => 41,crealname => 'we教官')), 1 => Array(0 => Array(bid => 6,brealname => '虎子',c... 阅读全文
posted @ 2015-10-30 10:47 屌丝IT男 阅读(4841) 评论(0) 推荐(1) 编辑

1
点击右上角即可分享
微信分享提示