


A brief analysis of the differences and usage scenarios between I() and create() methods in ThinkPHP
The following thinkphp framework tutorial column will give you a brief analysis of the differences and usage scenarios of the I() and create() methods in ThinkPHP. I hope it will be helpful to friends in need!
What is the difference between the I() method receiving data and the create() method receiving data in ThinkPHP?
Difference:
The I() method will automatically filter html entities;
- ## The #create method needs to manually call the filter method of the model after automatic creation. Create includes automatic creation of data objects, automatic verification, automatic completion, and field mapping.
Which one is generally used more frequently?
- When the number of accepted fields is small and those automatic functions are not needed, use the
I()
function;
- Accepts a large number of fields, uses the
create()
method, and can complete many functions when creating data, which is convenient and fast.
Recommended study: "The latest 10 thinkphp video tutorials"
The above is the detailed content of A brief analysis of the differences and usage scenarios between I() and create() methods in ThinkPHP. For more information, please follow other related articles on the PHP Chinese website!

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

MantisBT
Mantis is an easy-to-deploy web-based defect tracking tool designed to aid in product defect tracking. It requires PHP, MySQL and a web server. Check out our demo and hosting services.

SAP NetWeaver Server Adapter for Eclipse
Integrate Eclipse with SAP NetWeaver application server.

MinGW - Minimalist GNU for Windows
This project is in the process of being migrated to osdn.net/projects/mingw, you can continue to follow us there. MinGW: A native Windows port of the GNU Compiler Collection (GCC), freely distributable import libraries and header files for building native Windows applications; includes extensions to the MSVC runtime to support C99 functionality. All MinGW software can run on 64-bit Windows platforms.

PhpStorm Mac version
The latest (2018.2.1) professional PHP integrated development tool

VSCode Windows 64-bit Download
A free and powerful IDE editor launched by Microsoft