随笔分类 -  thinkPHP

PHP 编程
thinkphp 跳转
摘要:1 $this -> redirect('index',array('type'=>2,'id'=>0)); //直接跳转2 $this->success('提交失败,错误信息:0001",'Summer/index'); // 提示后跳转,无参数4 $this->success( '报名成功!'... 阅读全文

posted @ 2015-04-24 10:19 summerzi 阅读(390) 评论(0) 推荐(0) 编辑

thinkphp 的事务回滚处理 和 原始PHP的事务回滚实例
摘要:1. 要程序里面支持事务,首先连接的数据库和数据表必须支持事务 mysql 为例:数据库InnoDB支持 transactions数据表支持事务:InnoDB 支持transaction2. 框架thinkphp 支持事务代码public function testrollback(){$mode... 阅读全文

posted @ 2015-04-05 11:10 summerzi 阅读(11209) 评论(0) 推荐(0) 编辑

php 基本连接mysql数据库和查询数据
摘要:连接数据库,有三种方法1.常规方式:$con=mysql_connect($dbhostip,$username,$userpassword) or die("Unable to connect to the MySQL!");$db = mysql_select_db($dbdatabasenam... 阅读全文

posted @ 2014-08-06 14:47 summerzi 阅读(12538) 评论(0) 推荐(0) 编辑

thinkphp 去掉URL 里面的index.php(?s=)
摘要:例如你的原路径是 http://localhost/test/index.php/home/goods/index.html 那么现在的地址是 http://localhost/test/home/goods/index.html 如何去掉index.php呢?1.httpd.conf配置文件中加载... 阅读全文

posted @ 2014-07-25 17:24 summerzi 阅读(3787) 评论(2) 推荐(1) 编辑

mysql+thinkphp +amcharts 完成图表统计功能
摘要:思路:从mysql数据库查询数据,经过thinkphp后端控制器做逻辑处理,返回给前端,前端调用Amcharts插件1.数据查询:public function order($time='',$radio=1){ if($time== ''){ $time = D... 阅读全文

posted @ 2014-07-19 09:56 summerzi 阅读(5645) 评论(0) 推荐(0) 编辑

ThinkPHP笔记——开启debug调试模式
摘要:debug+trace模式可以查看开发过程中TP的错误信息,可以更好地帮助开发者debug。但是debug模式的开启还不是简单的在配置文件中中设置就可以的,经过查资料摸索,找到一种有效的方法。首先在你已经部署好了ThinkPHP的项目目录然后注意是在入口文件开启调试模式,在入口文件index.php... 阅读全文

posted @ 2014-07-14 10:11 summerzi 阅读(797) 评论(0) 推荐(0) 编辑

导航