getController($module); foreach ($all_controller as $controller) { $controller_name = $controller; $all_actio...
分类:
Web程序 时间:
2015-01-23 22:50:26
阅读次数:
175
在控制器中:/**
*输出验证码
*/
publicfunctiongetverify(){
$VModle=new\Think\Verify();
$VModle->codeSet=‘0123456789‘;
$VModle->length=4;
$VModle->entry();
}在页面中的html<inputtype="text"name="verify"placeholder="验证码"class="form-control"style=..
分类:
Web程序 时间:
2015-01-23 18:35:11
阅读次数:
153
最近一直想做一个技术类的新闻站点,想做的执行效率高些,想用PHP做,一直纠结于用纯PHP做还是用CI或者THINKPHP。用纯PHP效率高,缺点 n多,比如安全方面、构架方面等等等等;用CI、thinkPHP的话这些需要考虑的就少些,但是怕效率方面差得太多。后来就想先测测吧,如果差得太多, 就自己....
分类:
Web程序 时间:
2015-01-23 17:56:14
阅读次数:
208
首先在function.php中定义一个函数:
//关键字描红
function keywords_red($string,$keywords=''){
if(empty($keywords)||empty($string)) return $string;
return str_replace($keywords,''.$keywords.'',$string);
}
然后在...
分类:
Web程序 时间:
2015-01-23 14:44:46
阅读次数:
117
摘自以前CI实现的商城系统,做APP时需要实现数据接口,便用python实现了。
假设有表tp_article
id
title
type
1
哈哈
1
2
图样涂森坡
1
使用thinphp实现取出type为1的数据如下
M()->from(''tp_article'')->where('type=1')->se...
分类:
数据库 时间:
2015-01-23 14:43:15
阅读次数:
528
页面追踪调试 要打开它,需要:1、在配置文件中,加入配置项 'SHOW_PAGE_TRACE'=>true,2、控制器中需要classIndexControllerextendsController{publicfunctionindex(){ $user=newModel('User');//e....
分类:
Web程序 时间:
2015-01-22 12:30:18
阅读次数:
724
如果程序发生异常,thinkphp默认都是抛出 404 头。
ThinkPHP3.2.3相关代码:
#/ThinkPHP/Library/Think/Think.class.php
/**
* 自定义异常处理
* @access public
* @param mixed $e 异常对象
*/
static public fun...
分类:
Web程序 时间:
2015-01-21 16:37:06
阅读次数:
363
phpstorm默认配置下,编辑html文件,会看到标签之内只要出现'<'符号,phpstorm就会用红色的波浪线给标出来,提示“unescaped xml character”,如图:今天得到别人的提示,可以在右下角把检测关掉。于是,就找了找这个报错提示的源头,如图:如此配置之后,你在html文件...
分类:
Web程序 时间:
2015-01-20 19:47:57
阅读次数:
3257
开发工具(MACOSX)1.Xampp(1)apache(2)mysql(3)php(4)phpmyadmin修改config.inc.php进行配置,2.Sublimtext23.Chromebrowser4.SourceTree开发框架(ThinkPHP)重要概念Action对象Dao对象Vo对象Volist对象
分类:
其他好文 时间:
2015-01-20 18:23:51
阅读次数:
151
With the lastWebStorm/PhpStorm EAPyou can edit HTML and CSS code really fast usingZen Codingfeatures.To use it, you have to install Zen Coding plugin ...
分类:
Web程序 时间:
2015-01-20 17:48:11
阅读次数:
173