Home>Article>Backend Development> Steps to build a website in php
php steps to build a website
php framework website building tutorial
First go to the official website to download the thinkphp3.2.3 version of the framework, or you can git the latest 3.2.3 function
Set the bound module in the index.php entry file define('BIND_MODULE','Project');, the bound module can be defined by yourself, set the application path define('APP_PATH','./myweb/');
##Open the convention.php convention file under ThinkPHP\Conf to set the database connection and other default framework related settings, including database settings, data cache settings, log settings, default settings, template engine settings, layout settings, URL Settings, router settings, etc. Add a static page of index.html under the folder myweb\Project\View\Index as the output templateAdd some simple data tests Create a controller in myweb\Project\Controller to call, calculate, display and distribute the entire program, and pass the data through $ This->assign is used to assign values to the template, and $this->display() is used to render the template and output the data. It can be found under myweb\Project\Model Establish a data model and interact with the table through the D method or the m method. The memberModel.class.php file before the Model represents the name of the table member Notes You can also call the output directly without the model display needs to be called after assign For more PHP related knowledge, please visit
- 用户名
- 密码
- 姓名
- 手机号
- {$item["user_name"]}
- {$item["password"]}
- {$item["real_name"]}
- {$item["phone_num"]}
- {$item["email"]}
PHP中文网!
The above is the detailed content of Steps to build a website in php. For more information, please follow other related articles on the PHP Chinese website!