![](https://img-blog.csdnimg.cn/20201014180756754.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
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 · 7608 阅读 · 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 · 3546 阅读 · 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 · 279 阅读 · 0 评论 -
thinkphp 数据库设置前缀问题 联合查询
Home/Conf下的config.php <?php return 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 · 6842 阅读 · 1 评论