<?php namespace app\in\model; //定义验证器 use think\Validate; class User extends&...
429
通过本章的学习,实现了分类模块的增删改查,代码如下:模型:Sort.php<?php namespace app\admin\controller; use app\a...
228
<?php$demo1=function($name){ return $name.'最爱的人是:赵敏';};echo $demo1('张无忌'),'&l...
248
<?phpnamespace app\index\controller;use think\db;class Query{ // 写操作返回...
280
<?php //依赖注入 class Girl { public function shop() &nb...
194
shop.php<?php/** * Created by PhpStorm. * User: Administrator * Date: 2019/5/21 * Time: 11:11 */c...
230
<?php //单例模式 class Test { } $test1 = new Test(); $test2 = new ...
222
smarty 配置文件: <?php // smarty 配置文件 //Composer安装的Smarty 需要加载文件 require __...
398
<!DOCTYPE html><html><head> <meta charset="utf-8"> <...
285
$min = 0; $max = 10; $data = range($min,$max); $res = 0; $co...
209
①substr(string, start,[length]);截取字符串;去掉字符串中的最后一个字符 substr($str,0,strlen($str)-1); ...
328
<!DOCTYPE html> <html> <head> <title>登录</title> <meta ...
342
//自执行函数计算1到100的总和 <?php (function($length){ $total = 0; for($i=...
202
方法一 <xmp> 原样输出: <div>div容器</div> </xmp>方法二 &nbs...
283
public function userinfo() { &...
264