current location:Home > Technical Articles > PHP Framework > ThinkPHP

  • How to modify only one value in thinkphp
    How to modify only one value in thinkphp
    How thinkphp only modifies one value: 1. Modify the data by calling the save() function under Model; 2. Modify the data by "$res = $user->where('ID=5')->save($data) ";" method is used to add the where condition, and then call the save function to modify the data value.
    ThinkPHP 1076 2022-12-05 10:37:42
  • How to delete pictures in thinkphp image
    How to delete pictures in thinkphp image
    How to implement thinkphp image deletion of pictures: 1. Open the front-end code file; 2. Use the Ajax code "success:function(data) {...}" to achieve partial refresh; 3. Open the tp back-end code file and use "public function" delete_image(){...}" method can be used to delete image data.
    ThinkPHP 1074 2022-12-05 10:32:37
  • How to get the modified id in thinkphp3.2
    How to get the modified id in thinkphp3.2
    How to get the modified id in thinkphp3.2: 1. Open the corresponding tp file; 2. Instantiate the User object through "$User = D("User");"; 3. Through "$insert = $User->add ($data);" method to obtain the primary key id of the newly added data.
    ThinkPHP 1072 2022-12-05 10:25:41
  • How to delete multiple data in thinkphp
    How to delete multiple data in thinkphp
    How to delete multiple data in thinkphp: 1. Create a test data table in the mysql database; 2. In Thinkphp, create an index controller and inherit the Controller class; 3. Create a delMore() method for writing Delete data code; 4. Use the $where variable to store multiple data IDs to be deleted; 5. Delete multiple pieces of data through the delete() method.
    ThinkPHP 1969 2022-12-05 10:15:56
  • What to do if thinkphp does not filter html tags
    What to do if thinkphp does not filter html tags
    Solution to thinkphp not filtering html tags: 1. Open the corresponding tp file; 2. Reverse the converted entities through the "strip_tags(htmlspecialchars_decode($data['post']['post_content']));" method That’s it.
    ThinkPHP 1985 2022-12-05 10:11:10
  • What to do if thinkphp token verification fails
    What to do if thinkphp token verification fails
    Solution to thinkphp's token verification failure: 1. Turn off debug mode; 2. Open the config.php file and turn off page trace information output by setting "'SHOW_PAGE_TRACE' =>false,"; 3. Enable the sae engine.
    ThinkPHP 1914 2022-12-05 10:07:16
  • What should I do if thinkphp cannot obtain the session?
    What should I do if thinkphp cannot obtain the session?
    Thinkphp cannot obtain the session because the valid domain name of the cookie is not set. The solution is: 1. Open the "cookie.php" file; 2. Set the domain in the configuration to the real top-level domain name of the current project.
    ThinkPHP 2211 2022-12-05 10:02:27
  • How to implement retreat in thinkphp5.1
    How to implement retreat in thinkphp5.1
    The method to implement retreat in thinkphp5.1: 1. Add constants in "common/function.php"; 2. Call "<a href="{:U('User/logistics?return='. CURRENT_URL)}" target="blank"></a>"; 3. Just add javascript code to the page for the jump operation.
    ThinkPHP 1098 2022-12-05 09:53:05
  • What should I do if thinkphp cannot find the specified module?
    What should I do if thinkphp cannot find the specified module?
    Solution to thinkphp unable to find the specified module: 1. Enable debugging mode in config.php; 2. View nginx configuration; 3. Find "#START-ERROR-PAGE#error_page 403 /403.html; error_page 404 /404. html;#error_page 502 /502.html;”; 4. Just comment out the 404 error.
    ThinkPHP 1410 2022-12-05 09:46:45
  • How to check if a library exists in thinkphp
    How to check if a library exists in thinkphp
    How to query whether the thinkphp library exists: 1. Open the corresponding tp file; 2. Through " $isTable=db()->query('SHOW TABLES LIKE '."'".$data['table_name']."'");if($isTable){...}else{...}" Just verify if the table exists.
    ThinkPHP 1331 2022-12-05 09:40:30
  • How to set up pseudo-static removal directory in thinkphp
    How to set up pseudo-static removal directory in thinkphp
    How to set up pseudo-static directory removal in thinkphp: 1. Load the mod_rewrite.so module in the httpd.conf configuration file; 2. Change the None of Allowoverride None in httpd.conf to All; 3. Modify the corresponding project configuration file; 4. Just create an .htaccess file under the root directory of the project.
    ThinkPHP 1299 2022-12-05 09:35:50
  • How to query multiple data in thinkphp
    How to query multiple data in thinkphp
    How to query multiple data in thinkphp: 1. Use the Table method to query multiple tables, with syntax such as "$Model->table('think_blog blog, think_type type')"; 2. Use the Join method to query, with code such as "$Model ->join('work ON artist.id = work.artist_id')".
    ThinkPHP 1951 2022-12-05 09:26:45
  • How to query yesterday's data in ThinkPHP5
    How to query yesterday's data in ThinkPHP5
    How to query yesterday's data in ThinkPHP5: 1. Open ThinkPHP5 related files; 2. Query yesterday's data through the expression "db('table')->whereTime('c_time', 'yesterday')->select();" Can.
    ThinkPHP 1678 2022-12-05 09:20:48
  • Example to explain how TP framework integrates Huawei Cloud SMS service
    Example to explain how TP framework integrates Huawei Cloud SMS service
    The following thinkphp framework tutorial column will introduce to you how ThinkPHP integrates Huawei Cloud SMS Service. I hope it will be helpful to friends in need!
    ThinkPHP 2011 2022-11-18 21:04:04
  • Example record: Problems using Topsdk\Topapi in ThinkPhp5.1
    Example record: Problems using Topsdk\Topapi in ThinkPhp5.1
    The following thinkphp framework tutorial column will introduce to you the problems of using Topsdk\Topapi in ThinkPhp5.1. I hope it will be helpful to friends in need!
    ThinkPHP 1188 2022-11-13 16:31:06

Tool Recommendations

jQuery enterprise message form contact code

jQuery enterprise message form contact code is a simple and practical enterprise message form and contact us introduction page code.
form button
2024-02-29

HTML5 MP3 music box playback effects

HTML5 MP3 music box playback special effect is an mp3 music player based on HTML5 css3 to create cute music box emoticons and click the switch button.

HTML5 cool particle animation navigation menu special effects

HTML5 cool particle animation navigation menu special effect is a special effect that changes color when the navigation menu is hovered by the mouse.
Menu navigation
2024-02-29

jQuery visual form drag and drop editing code

jQuery visual form drag and drop editing code is a visual form based on jQuery and bootstrap framework.
form button
2024-02-29

Organic fruit and vegetable supplier web template Bootstrap5

An organic fruit and vegetable supplier web template-Bootstrap5
Bootstrap template
2023-02-03

Bootstrap3 multifunctional data information background management responsive web page template-Novus

Bootstrap3 multifunctional data information background management responsive web page template-Novus
backend template
2023-02-02

Real estate resource service platform web page template Bootstrap5

Real estate resource service platform web page template Bootstrap5
Bootstrap template
2023-02-02

Simple resume information web template Bootstrap4

Simple resume information web template Bootstrap4
Bootstrap template
2023-02-02

Cute summer elements vector material (EPS PNG)

This is a cute summer element vector material, including the sun, sun hat, coconut tree, bikini, airplane, watermelon, ice cream, ice cream, cold drink, swimming ring, flip-flops, pineapple, conch, shell, starfish, crab, Lemons, sunscreen, sunglasses, etc., the materials are provided in EPS and PNG formats, including JPG previews.
PNG material
2024-05-09

Four red 2023 graduation badges vector material (AI EPS PNG)

This is a red 2023 graduation badge vector material, four in total, available in AI, EPS and PNG formats, including JPG preview.
PNG material
2024-02-29

Singing bird and cart filled with flowers design spring banner vector material (AI EPS)

This is a spring banner vector material designed with singing birds and a cart full of flowers. It is available in AI and EPS formats, including JPG preview.
banner picture
2024-02-29

Golden graduation cap vector material (EPS PNG)

This is a golden graduation cap vector material, available in EPS and PNG formats, including JPG preview.
PNG material
2024-02-27

Home Decor Cleaning and Repair Service Company Website Template

Home Decoration Cleaning and Maintenance Service Company Website Template is a website template download suitable for promotional websites that provide home decoration, cleaning, maintenance and other service organizations. Tip: This template calls the Google font library, and the page may open slowly.
Front-end template
2024-05-09

Fresh color personal resume guide page template

Fresh color matching personal job application resume guide page template is a personal job search resume work display guide page web template download suitable for fresh color matching style. Tip: This template calls the Google font library, and the page may open slowly.
Front-end template
2024-02-29

Designer Creative Job Resume Web Template

Designer Creative Job Resume Web Template is a downloadable web template for personal job resume display suitable for various designer positions. Tip: This template calls the Google font library, and the page may open slowly.
Front-end template
2024-02-28

Modern engineering construction company website template

The modern engineering and construction company website template is a downloadable website template suitable for promotion of the engineering and construction service industry. Tip: This template calls the Google font library, and the page may open slowly.
Front-end template
2024-02-28
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!