<?php//function get_article(){// $conn=mysqli_connect("localhost","ro...
388
<!DOCTYPE html><html> &...
1592
<?php header("content-type:text/html;charset=utf-8"); //1.創(chuàng)建PDO對象,連接數(shù)據(jù)庫 $pdo=new ...
420
controller/Index.php<?php namespace app\index\controller; use app\index\model\SlideMode...
370
controller/Slide.php<?php namespace app\admin\controller; use app\admin\controller\Comm...
308
controller/Sort.php<?php namespace app\admin\controller; use app\admin\controller\Commo...
367
controller/news<?php namespace app\admin\controller; use app\admin\controller\Common; u...
1793
1、用phpstorm打開項目,執(zhí)行composer require topthink/think-captcha2、在config目錄下建captcha.php文件,如圖:
315
<?php/** * 流程控制之分支結(jié)構(gòu) * 1. 分支:單分支,雙分支,多分支,switch * 2. 分支結(jié)構(gòu)使用腳本具備了簡單的人工智能 *//**...
424
<?php/** * 教學(xué)內(nèi)容: 什么是閉包? * 1. 提到閉包,就不得不提匿名函數(shù),php官方手冊中,將閉包與匿名函數(shù)視為等同的 * 2. 閉包的三種使用場景:...
347
<?php/** * 教學(xué)內(nèi)容: 為什么說常量是只讀變量? * 1. 常量的作用: 有一個腳本中,有一些數(shù)據(jù)是不會發(fā)生變化的,例如用戶的國籍,登錄狀態(tài)等 *&nbs...
1532
<?php/** * 教學(xué)內(nèi)容:程序主要是由什么組成的? * 知識點: * 1. 程序主要是由變量和函數(shù)組成的 * 2. 變量的命名,定義與訪問 ...
293
echo (function($a){ &n...
181
PHP有函數(shù)作用域,//$a作用域為函數(shù)sumfunction sum(){ $a=10; return $...
251
<?php//聲明相加函數(shù) function sum($a,$b){ $total=$a+$b; return $total; }//調(diào)用sum函數(shù)echo sum(10,20);
448