Is the CI framework superfluous?

when I first came into contact with the frame, I felt that the CI framework had a lot of superfluous places, such as:

  • the acquisition of POST parameters: $_ POST ["key"] is not it easier and more convenient than $this- > input- > post ("key") ?
  • set cookie: setcookie () and $this- > input- > set_cookie ()
  • execute sql statements: mysql_query () and $this- > db- > query ()
  • there are also activity records, how this sql is executed

where are these interfaces better than the native ones? If the function is the same, why not just use the native function instead? what are the benefits?

Mar.18,2021

strong in:

  1. $this- > input- > post ("key") checks for the existence of key
  2. $this- > input- > set_cookie () you can use an array as a parameter
  3. $this- > db- > query () can be adapted to a variety of databases (of course, database-specific features may not be supported), and the interface is also friendlier than mysql/mysqli
  4. Active Record is a design pattern for implementing ORM, which is characterized by its ease of use

$_ POST ["key"] is written incorrectly
is correct isset ($_ POST ["key"])? Htmlspecialchars ($_ POST ["key"]): null;

other things, I don't want to say anything else

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1e43cd5-44a64.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1e43cd5-44a64.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?