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

  • How to clear cookies correctly in thinkphp5
    How to clear cookies correctly in thinkphp5
    In Web development, Cookie (HTTP cookie) is a small data file stored by the server on the client. It can be used to track and record the user's login status, etc. It is a very important technology. When using ThinkPHP5 to develop web applications, cookies are often used. But sometimes, we need to clear cookies in the program. For example, when the user logs out, he needs to clear the logged-in cookies. This article will introduce how to correctly clear cookies in ThinkPHP5. 1. Use all
    ThinkPHP 1134 2023-03-31 17:28:35
  • What is an auto-increment ID? How to obtain and use thinkphp?
    What is an auto-increment ID? How to obtain and use thinkphp?
    As a PHP developer, you may have encountered such a problem: how to get the ID of a newly inserted record in a table that uses auto-increment ID. In ThinkPHP, you can directly call the `$model->getLastInsID()` method to get this ID. In this article, we'll cover more details and how to use it. ## What is an auto-increment ID? An auto-incrementing ID is a numerical value that is automatically generated and incremented in a table and is usually used as a unique identifier for each record. In the database, MyS
    ThinkPHP 2909 2023-03-31 17:29:19
  • A brief analysis of the method of obtaining SQL in ThinkPHP
    A brief analysis of the method of obtaining SQL in ThinkPHP
    How to obtain SQL in ThinkPHP ThinkPHP is an open source web application framework based on the MVC model of the PHP language. Due to its extremely high development efficiency and good scalability, it has become the preferred framework for many PHP developers. When developing projects, we need to operate the database. At this time, it is very necessary to obtain SQL statements. The following describes how to obtain SQL statements in ThinkPHP. 1. Preconditions - The data model defined in thinkphp needs to support outputting SQL statements. -
    ThinkPHP 2242 2023-03-31 17:29:41
  • How to use the get method of ThinkPHP model to determine whether the data is empty
    How to use the get method of ThinkPHP model to determine whether the data is empty
    When writing programs using the ThinkPHP framework, we often need to determine whether the data in the model is empty. At this time, we can use the get method provided by the framework to complete. Next, this article will introduce in detail how to use the get method of the ThinkPHP model to determine whether the data is empty. 1. Introduction to the get method In ThinkPHP, after the model is instantiated, we can use the get method to obtain the corresponding data. This method supports parameters and conditions. Parameters are used to specify the data columns and restrictions to be obtained; conditions are used to filter those that meet the specified conditions.
    ThinkPHP 1190 2023-03-31 17:23:21
  • What should I do if thinkphp cannot access the path?
    What should I do if thinkphp cannot access the path?
    ThinkPHP framework is an excellent PHP development framework that provides developers with many convenient functions and tools. However, you may encounter some problems when developing applications using ThinkPHP. One of them is that it is inaccessible after joining the path. In this article, we will analyze the causes of this problem and provide solutions. 1. Cause of the problem When we add a path to the page, for example: ```<link rel="stylesheet" type="text/css" href="
    ThinkPHP 969 2023-03-31 13:55:02
  • Let's talk about the problem and solution of JS files failing to load in ThinkPHP
    Let's talk about the problem and solution of JS files failing to load in ThinkPHP
    Topic: The problem and solution of JS file failure in ThinkPHP. In the process of web development, JavaScript (hereinafter referred to as JS) is often used for page interaction. There are many convenient methods to use ThinkPHP in the PHP framework to easily Realize the reference to the JS file. However, sometimes we encounter the problem that JS cannot be loaded, which brings certain troubles to our development work. This article will introduce the problem of JS files failing to load when using ThinkPHP and its solution. #
    ThinkPHP 1138 2023-03-31 13:55:36
  • How to update unchanged data to 0 in thinkphp5
    How to update unchanged data to 0 in thinkphp5
    ThinkPHP 5 is an open source PHP framework that can greatly improve the efficiency of web application development. Among them, operations involving data query, insertion, update, deletion and other operations are one of the most frequently used parts. This article will discuss how to update unchanged data to 0 when the data is updated using the ThinkPHP 5 framework. In ThinkPHP 5, it is very convenient to use ORM object-relational mapping for data operations. When updating data, we usually use the save() method of the model object to complete the data update.
    ThinkPHP 499 2023-03-31 13:56:18
  • Summarize the steps of building a website with ThinkPHP framework
    Summarize the steps of building a website with ThinkPHP framework
    ThinkPHP is an excellent PHP development framework that is easy to use and has complete functions. It is an MVC design pattern framework with many features such as ORM and MVC, and has good scalability and maintainability. This article will introduce the steps to build a website using the ThinkPHP framework. 1. Install ThinkPHP framework 1.1 Download ThinkPHP Download the latest version of ThinkPHP framework from ThinkPHP official website (http://www.thinkphp.cn/) and unzip it
    ThinkPHP 1712 2023-03-31 13:56:39
  • How to modify the size of uploaded files in thinkphp
    How to modify the size of uploaded files in thinkphp
    ThinkPHP is an excellent PHP development framework that provides rich extension functions to facilitate developers to quickly complete various needs. During development, file uploading is a common requirement. But by default, ThinkPHP upload file size is limited. So, how to modify the upload file size? 1. The first thing to note when modifying the PHP.ini configuration is that there is a limit on the size of the uploaded file in the PHP.ini file. Therefore, we can modify the size of the uploaded file by modifying the PHP.ini file. Tool
    ThinkPHP 1515 2023-03-31 13:57:08
  • An article explaining in detail the methods and precautions for modifying exceptions in ThinkPHP
    An article explaining in detail the methods and precautions for modifying exceptions in ThinkPHP
    ThinkPHP is an excellent open source PHP framework, but some exceptions will inevitably occur during use. This article mainly explains the methods and precautions for modifying exceptions in ThinkPHP. I hope it will be helpful to developers. 1. Exception classification In ThinkPHP, exceptions are divided into system exceptions, custom exceptions and HTTP exceptions. System exception: refers to errors in the framework or PHP itself, such as syntax errors, classes that do not exist, etc. Custom exceptions: refer to exceptions defined by ourselves in the code, used for certain specific business logic needs. HTTP
    ThinkPHP 607 2023-03-31 13:57:27
  • How to solve the problem that thinkphp background login does not jump?
    How to solve the problem that thinkphp background login does not jump?
    When using ThinkPHP to develop a website, sometimes there will be a problem of being unable to jump after logging in to the background. This may be due to some bugs in the code or setup issues, and this article will cover some possible solutions. 1. Check for errors in the code. Some non-standard writing or grammatical errors used in the code may cause the background login to not jump. Therefore, we need to carefully check whether the code is standardized and whether the statements are correct. Especially the code in the controller and model files, make sure there are no syntax errors or missing some necessary code. After checking the code, re-
    ThinkPHP 1384 2023-03-31 13:57:43
  • Why can't tp5 find index.php?
    Why can't tp5 find index.php?
    When developing using TP5 (ThinkPHP5), index.php often cannot be found. This may be due to several reasons.
    ThinkPHP 1081 2023-03-29 17:29:48
  • How to hide wap.php in thinkphp
    How to hide wap.php in thinkphp
    With the popularity of mobile Internet, more and more web applications need to support mobile phone access, so many websites will have a dedicated WAP site to facilitate users to access on mobile devices. However, accessing WAP sites through URLs is not very friendly. URLs usually have suffixes such as "wap.php", which causes trouble for users. This article will introduce a method to hide "wap.php" to make the WAP site more friendly.
    ThinkPHP 561 2023-03-21 12:01:55
  • How to query the total number of data in tp5? Three ways to share
    How to query the total number of data in tp5? Three ways to share
    In PHP, tp5, as a popular MVC framework, is often used to build high-performance web applications. During the development process, we need to query the data in the database with the help of the Model class provided by tp5. When querying data, you often need to know the total number of data. This article will introduce how to query the total number of data in tp5.
    ThinkPHP 1812 2023-03-21 11:06:07
  • How to modify routing rules in ThinkPHP
    How to modify routing rules in ThinkPHP
    In the Think PHP framework, routing refers to the process of mapping URL addresses to corresponding processing methods. By default, the Think PHP framework uses the method of determining routing based on parameters in the URL address, but in actual applications, we sometimes need to customize routing rules. This article will introduce how to modify routing rules in the Think PHP framework.
    ThinkPHP 910 2023-03-21 11:03:28

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!