now a lot of corporate recruitment, direct request will use the thinkphp framework, perhaps you prefer the original, but can not deny the efficiency of framework development.
OK, let's learn ThinkPHP5.0 together.
I use ThinkPHP5.0.5 full version as the practice version ~ ~
Download Address 1:http://www.thinkphp.cn/down.html
Download Address 2:http://download.csdn.net/detail/iwanghang/9763145 (recommended here to download, official website Download I failed, I found the version elsewhere)
Entry file:
Configuration file:
Database configuration:
Once you have configured your database information in database.php, you can perform database operations in \application\index\controller\index.php, referring to the following code:
(commented code, do not understand the relationship, we continue to learn the next blog!)
<?php/** * Namespace namespace */namespace app\index\controller;use think\controller;use Think\db;class Index extends controller{Public Function Index ($name = ' Iwanghang ') {echo $name. ' <br> '; Print_r ($this->request->param ()); http://www.php.cn/:8888/myPhpDemo/ThinkPhp5.0.5/ThinkPHP_full_v5.0.5/public/index/index/index/aa/11/bb/22/cc /33//above the printed result of the connection: Array ([AA] + = [BB] = [CC] = 33)/** * Query the Users table information and print */ $data = Db::name (' users ')->find (); Print_r ($data);//$this->aasign (' data ', $data);//$this->aasign (' name ', name);//Return $this-> ; Fetch (); Return ' <style type= "text/css" > *{padding:0; margin:0;} . think_default_text{padding:4px 48px;} A{color: #2E5CD5; Cursor:pointer;text-decoration:none} a:hover{text-decoration:underline;} body{background: #fff; font-family: "Century Gothic", "Microsoft Yahei"; Color: #333; font-size:18px} h1{font-size:100px; font-weight:normal; margin-bottom:12px;} p{line-height:1.6em; font-size:42px} </style> <p style= "padding:24px 48px;" >
The above is the Android programmer to learn PHP development (-thinkphp5.0) (1) First experience-phpstorm content, more relevant content please pay attention to topic.alibabacloud.com (www.php.cn)!