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