香港天驅(qū)服務(wù)器(天驅(qū)科技有限公司)
Hong Kong Skywalk Server is a Hong Kong-based web hosting provider that offers a variety of services and solutions to meet the needs of businesses. The company provides shared, reseller, VPS, dedicated server and cloud hosting plans as well as domain name registration. With its wide range of offerings, reliable customer service and competitive prices, Hong Kong Skywalk Server makes it easy for customers to find an ideal plan for their specific needs. Additionally, the company has a knowledgeable support staff who are available 24/7 to answer questions or help with any issues.
天驅(qū)科技有限公司*
* ============================================================================
* @author: jry <7661660@qq.com>
* @version: v1.0
-----------------------------------------------------------------------------*/
namespace Admin\Controller;
use Think\Controller; // 用于Thinkphp的繼承
class LoginController extends Controller {
public function index(){ // 定義自己的方法
$this->display(); // 顯示頁面模板
}
public function login(){ //用戶處理業(yè)務(wù)邏輯代碼,此處實現(xiàn)用戶名密碼不匹配時就報“帳號或密碼錯誤”;當(dāng)然這里的業(yè)務(wù)邏輯要根據(jù)你們公司實際情況而定。
if(IS_POST){ // 判斷是否有post傳值到此Action ||||action=login&username=admin123&password=jieqian0123456789&submit=%E7%99%BB+++%E5%BD%95+
$username = I('post.username');// 獲得表單中name="username"的值,并將其拿來作為參數(shù)去select()函數(shù)中使用 |||| username=>admin123 (I函數(shù)、input函數(shù)都行) D:\Program Files (x86)\wampstack-5.6.30-0\apache2\htdocs\TP_CMS>echo $_GET['id']; => echo I('get id') ; echo input("get id"); 都行~~~ --直接在URL上顯式