current location:Home > Technical Articles > PHP Framework > ThinkPHP
- Direction:
- All web3.0 Backend Development Web Front-end Database Operation and Maintenance Development Tools PHP Framework Daily Programming WeChat Applet Common Problem Other Tech CMS Tutorial Java System Tutorial Computer Tutorials Hardware Tutorial Mobile Tutorial Software Tutorial Mobile Game Tutorial
- Classify:
-
- How to turn off the cache in thinkphp5.1
- How to turn off the cache in thinkphp5.1: 1. Find the "\ThinkPHP\Common\convention.php" and "\ThinkPHP\Common\debug.php" files; 2. Modify the content in debug.php to "'TMPL_CACHE_ON' => false,"; 3. Modify the content in convention.php to "'ACTION_CACHE_ON' => false,".
- ThinkPHP 1464 2022-12-13 09:58:56
-
- How to query duplicate database in thinkphp
- How to query duplicate databases in thinkphp: 1. Instantiate the data table through "$test_data = M('hot');"; 2. Use "testdata>Distincttrue)->field(descriprion')->orderdescription desc->select" method or use the group method to remove duplicates.
- ThinkPHP 1619 2022-12-13 09:51:01
-
- How to convert thinkphp collection to array
- Method of converting thinkphp collection to array: 1. Get the data collection, the code is such as "Array([0] => app\common\model\GoodsSku Object([connection:protected] => Array()..."; 2. Use the "collection->toArray()" method to convert the data into a standard array type.
- ThinkPHP 1984 2022-12-13 09:42:43
-
- How to use thinkphp addall method
- The thinkphp addall method is a method provided by thinkphp for batch operations on data. This method is located in "Library/Think/Model.class.php". Its correct usage syntax is "$user->addAll($data, array(),true)".
- ThinkPHP 1848 2022-12-13 09:30:34
-
- Can thinkphp configure a new database separately?
- thinkphp can configure a new database separately. The setting method is: 1. Add configuration parameters such as "'DB_HOST' => 'localhost'..." in the application configuration file or module configuration file; 2. Configuration in different application states Independent database configuration information is defined in the file; 3. Specify the database connection information when instantiating, with syntax such as "$User = M('User','other_','mysql://root...".
- ThinkPHP 1662 2022-12-13 09:24:40
-
- Does thinkphp5.1 support extra?
- thinkphp5.1 does not support extra. The config function in thinkphp5.1 has canceled the support for extra; you can paste the "function editConfig($arr = [],$user='admin'){...}" code into the app or This function can be used globally in common.php in the application folder.
- ThinkPHP 1861 2022-12-12 09:38:30
-
- How to jump to the current page in thinkphp
- How thinkphp jumps to the current page: 1. Create a new login.html page under index/login; 2. Create a new login controller; 3. Determine whether the jump is successful through "protected function success(){...}" ; 4. Open the "dispatch_jump.tpl" file; 5. Modify the configuration code under "config.php".
- ThinkPHP 2163 2022-12-12 09:21:28
-
- How to hide module name in thinkphp3.2
- How to hide the module name in thinkphp3.2: 1. Create a ".htaccess" file in the root directory; 2. Add "RewriteEngine on RewriteCond %{REQUEST_FILENAME} !-d"; 3. Add "config.php" under the corresponding module "Set the access module in ".
- ThinkPHP 1801 2022-12-09 10:11:01
-
- THINKPHP public What to do if something goes wrong
- Solution to THINKPHP public error: 1. Find and open the ".htaccess" file in the public directory; 2. Directly replace the content with "RewriteEngine on RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME} !-f". .
- ThinkPHP 1227 2022-12-09 09:28:31
-
- What should I do if the thinkphp5 display class does not exist?
- Solution to the non-existence of thinkphp5 display class: 1. Query through the new Employee class in the Controller layer; 2. Modify the code to "$dlist = Db::name("employee")->where($condition)->field ("id,name")->select();" can be done.
- ThinkPHP 1781 2022-12-09 09:22:15
-
- How to query if there is data in thinkphp
- How to query whether there is data in thinkphp: 1. Open the corresponding tp file; 2. Instantiate the object through "M("gkwh_dictdata");"; 3. Use "if($list_dictdata !== null) {$obj-> code = -1;...}" statement can be used to determine whether the data exists.
- ThinkPHP 1435 2022-12-09 09:17:22
-
- What to do if thinkphp tcpdf is garbled?
- Solution to thinkphp tcpdf garbled code: 1. Download the plug-in TCPDF; 2. Use TCPDF through "class Pdf extends \app\common\controller\Base{...}"; 3. Change the font to "$pdf->SetFont ('cid0cs', '', 8)" can solve the garbled code problem.
- ThinkPHP 1593 2022-12-08 10:29:56
-
- How to use thinkphp5 model method
- How to use thinkphp5 model: 1. Query multiple records through "User::all(function($query){...}"; 2. Use "User::select(function($query){...}" "Query; 3. Query through find() method and get() method; 4. Query data using column() method.
- ThinkPHP 1917 2022-12-08 10:20:28
-
- What to do if thinkphp resource routing error occurs
- Solutions to thinkphp resource routing errors: 1. Open the corresponding tp file; 2. Set the resource routing for RESTFul requests through "Route::resource('blog','index/blog');"; 3. Replace public Orientation is enough.
- ThinkPHP 1254 2022-12-08 10:08:43
-
- How to close cache in thinkphp
- How to close the cache in thinkphp: 1. Find the convention.php and debug.php files; 2. Modify the content in debug.php to "'TMPL_CACHE_ON' =>false,"; 3. Modify the content in convention.php to "' HTML_CACHE_ON' => false," that's it.
- ThinkPHP 1855 2022-12-08 09:58:13