Android Programmers Learn PHP development (-thinkphp5.0) (1) First experience-phpstorm

Source: Internet
Author: User
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-&gt        ; 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)!

  • Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.