Installation Framework Xampp:xml, Apache, MySQL, PHP, PERL lamp:linux, Apache, MySQL, Phplnmp:linux, Ningx, MySQL, phpj2ee: Your Linux command 1. Shut down the system comes with Apachesudo/usr/sbin/apachectl stop2. View Apache System Process Ps-ef | grep httpd3. View MySQL Process Ps-ef | grep mysql4. View PHP version php-version5. Displays the current path PWD6. Clear screen clear7. Change the permissions of the file (read and write instead) | | ./* All files under current path sudo chmod-r 777./*8. Go to Folder cd9. Content under current file ls
| Catalogue |
Description |
| Common |
Common functions for Project public files directory, general placement of items |
| Conf |
Project configuration directory, all the configuration files of the project are put here |
| Lang |
Project Language Pack directory (optional if multiple language support is not required to delete) |
| Lib |
Project class library catalogs, usually including action and model subdirectories |
| Tpl |
Project template catalog, Support Template theme |
| Runtime |
The Project runtime directory, which includes the cache (template cache), Temp (data cache), data directory, and logs (log file) subdirectories, are first grouped if there is a grouping. |
Defines a constant specifying the project name define (' App_name ', ' admin '); The directory path where the project is executed
Define (' App_path ', './admin/');
Load frame entry file require ('./thinkphp/thinkphp.php '); $this->show () set debug mode: In Index.php//Start Debug mode define (' App_debug ', true); Http://localhost/phprise/admin.php/index/add
methods in the Ingress/controller/Controller
Template SubstitutionConfiguring a template replacement in admin/conf/config.php __app__<br> replaces the URL address of the current project (without the domain name) __public__<br> will be replaced with the public directory of the current site, usually/public /__ROOT__ will replace the current website address (without domain name) __js__ ' __js__ ' ='admin/common/resources/scripts/',//Add new JS class library path substitution rule Tag properties: Name:php used in Id:js class:css with post, get method
$this->display (' login '); The default load is the login.html under this controller$this->display ();//The method name under this controller is loaded by default. html file $this->display (' Index/login '); load the login.html file under the index controller $this- >display ('./full path '); The current location is relative to the entry file of the project, instead of the template directory link database in admin/conf/config.php, configure the database link $admin = M (' admin '); Get the database object, an object corresponding to a table $result = $admin->field (' Id,name ')->where ("Name= ' $name ' and password = ' $password '") Find (); $result 1 = $admin->field (' Id,name ')->where ("Name= ' $name ' and password = ' $password '")->select (); Select returns an array set; Find returns a result, an array, and when querying a single piece of data we recommend the use of Find; dump:thinkphp printing method Array (2) {
["name"] + = string (3) "SDF"
["password"] = + string (3) "SDF"}var_dump php Native Method Array (2) {["Name"]=> string (3) "SDF" ["Password"]=> string (2) "Ad"}
Initial knowledge of thinkphp frame