Original: CodeIgniter connection database and Quick StartFirst, the database configurationCodeIgniter has a configuration file that lets you store database connection values (Username: username, password: password, database name: ). The
CodeIgniter PHP
Write a 20131010 date
And then in getting the system now time now if the time is 20131113
How to use CodeIgniter to get the current time of the system?
If 20131010 date and 20131113 compare
if () {
Alert (present date
In CodeIgniter, database usage is very frequent. You can use the database class that comes with the framework to perform database operations conveniently.Initialize Database Class
Load and initialize the Database Class Based on your Database
First, the database configurationCodeIgniter has a configuration file that lets you store database connection values (Username: username, password: password, database name: ). The configuration file is located in the application/config/database.php .
Connect to the database:
Format: mysql-H host address-u user name-P User Password
Database prompt: mysql>
Exit database:
Exit (Press ENTER)
Knowledge Point accumulation:
1. date_default_timezone_set-sets the default time zone used for all
First, the database configurationCodeIgniter has a configuration file that lets you store database connection values (Username: username, password: password, database name: ). The configuration file is located in the application/config/database.php .
Codeigniter (CI) combined with PHPExcel class to complete data import 1. install PHPExcel to Codeigniter
1) decompress the contents in the Classes folder of the compressed package to the application \ libraries \ directory. the directory structure
It takes only three steps to use CodeIgniter to generate a website sitemap. the method is very simple. you can refer to the CI framework.
1. a controller named sitemap is created. The code is as follows:
If (! Defined ('basepath '))Exit ('no
CodeIgniter is used to generate a site map. 1. create a controller named sitemap and copy the code as follows :? Phpif (! Defined (BASEPATH) exit (Nodirectscriptaccessallowed); classSitemapextendsCI_Controller {
1. a controller named sitemap is
1. Install Phpexcel to CodeIgniter
1) Unzip the contents of the Classes folder in the package into the Application\libraries\ directory, the directory structure is as follows:
–application\libraries\phpexcel.php
–application\libraries\phpexcel
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.