thinkphp
power0405hf
这个作者很懒,什么都没留下…
展开
-
THinkPHP 读写文件相关
public function file(&$txt){ $myfile = fopen("./data/1.txt", "a+") or die("Unable to open file!"); fwrite($myfile, $txt); $txt = ","; fwrite($myfile, $txt); $a= fread($myfile,filesize原创 2015-05-04 20:18:32 · 7604 阅读 · 0 评论 -
thinkphp 同一模板内的方法调用另一个方法
//thinkphp里面同一模板内的方法调用public function a(&$txt){$txt.='hh';}public function b(){$b='bbb';$this->a($b);echo $b;//'bbbhh'}&$:地址调用public function c(){$a='hh';return $a;}publi原创 2015-05-04 13:14:50 · 3544 阅读 · 1 评论 -
PHP 数据表相关
创建数据表 $sql ="CREATE TABLE IF NOT EXISTS `qoe_service_user` ( `id` int(8) NOT NULL auto_increment, `service_user` varchar(20) NOT NULL, `counter` int(8) NOT NULL DEFAULT 0, PRIMARY KEY (原创 2015-05-05 14:08:30 · 278 阅读 · 0 评论 -
thinkphp 数据库设置前缀问题 联合查询
Home/Conf下的config.php<?phpreturn array( //'配置项'=>'配置值' 'DB_TYPE'=>'mysql', 'DB_HOST'=>'1.2.3.4', 'DB_NAME'=>'3s', 'DB_USER'=>'root', 'DB_PWD'=>'password', 'DB_PORT'=>'3306原创 2015-09-19 16:47:09 · 6841 阅读 · 1 评论