Find this passage on the website:The type of this file is not an error such as the list of forbidden uploads. The main reason for this error is that PHP Hp_fileinfo is not turned on,Especially under Windows, php5.3 below. Because CI will use this extension to check the file type,And above php5.3 the extension is introduced by default, not an extension. So you need to open the extension and restart the service.Another reason is that the MIME type set i
The CI framework comes with a zip class that is simple and practical, and this article simply explains the use of the CI Framework's zip class.
First you need to import the Zip class:
. The code is as follows:
$this->load-> (' Zip ');
In addition, however, given the structure of CI, it is necessary to set up an automatic loading class to load the zip in.
You
This example describes the method for CI mapping (loading) data to the view layer. Share to everyone for your reference, specific as follows:
CI has a disgusting thing, that is, you need to put all the data into the $DATA array to map to the view layer, such as:
Currently I am from the Database Link table (Friendship Link table, field: id name URL), search out the data way:
$query = $this->db->query
This paper analyzes the usage of $this->load->library () in CI framework. Share to everyone for your reference, specific as follows:
The first time I failed to load, originally is the file name and class name for different reasons, first summed up about CI loading your own class file considerations:
1. Third party loaded items should be placed under Application/libraries documents
2. FileName and class n
This article illustrates the use of _fetch_uri_string () function in CI framework uri.php. Share to everyone for your reference, specific as follows:
apppath/config/config.php in the URL format.
$config [' uri_protocol '] = ' AUTO ';
This configuration project defines which server global variable you use to develop URLs.The default setting is auto, which polls the following four ways. When your link is not working, try using an option
This article gives an example of how the CI Framework consolidates Widgets (page patterns). Share to everyone for your reference, specific as follows:
In the Web development process, we inevitably have to output the view file, and usually the view file is not generally the head, the left side of the bar and the bottom of these common elements.
How do I get the whole project development to introduce agile thinking when it comes to the application of
The CI framework comes with a zip class that is simple and practical, and this article simply explains the use of the CI Framework's zip class.
First you need to import the Zip class:
Copy Code code as follows:
$this->load-> (' Zip ');
In addition, however, given the structure of CI, it is necessary to set up an automatic loading class to load
With the idea of the MVC architecture, all controllers in CI need to load the call through a single point of entry file index.php (default). That is, by default, all CI development project URLs are in the form of the following:
Http://localhost/index.php/blog/logs/this_is_a_test_entry
Obviously, by default, index.php in the URL address section of the existence of a certain degree of impact on the simplici
The CI framework was recently studied, and a simple project was made to connect to the local server environment, but when deployed to a remote server:
http://example.com/(index.php)/accessible (default controller-class for configuration)
http://example.com/(index.php)/[controller-class]/[controller-method] cannot be accessed (hint 404 error!) )
Last Baidu Reason:
For/index.php/abc such url,apache and lighttpd are interpreted as "index.php?abc" and
CI Framework has Send mail class: Specific can see the manual, about the mail configuration file, I put in a separate file, easy to maintain
The file name is: email.php, this file is saved to application/config/email.php, and then the controller is loaded with $this->load->library ("email"), so there is no need to use $this- >email->initialize () function to initialize parameters.
PHP code
$config ["protocol"] = "SMTP";$config ["smtp_host"] = "smtp
Label: Reproduced in: http://blog.sina.com.cn/s/blog_76e7bdba01016p2p.htmlThe first time the database is connected in CI, enter the following statement in the constructor of the controller or model $this->load->database ();
There is no need to repeat the connection, in that controller or model can do any number of queries. Query operation (equivalent Select) method one: $query = $this->db->get (' sites '); Sites for Table name
This is a "select *
Tags: php ci1. First find: C:\AppServ\www\ci\application\config under the database.php file to modify the parameters of the connection database2. Locate the corresponding file in the controller C:\AppServ\www\ci\application\controllers650) this.width=650; "Src=" http://img.blog.csdn.net/20150424001535007?watermark/2/text/ ahr0cdovl2jsb2cuy3nkbi5uzxqveglhb21vz2c=/font/5a6l5l2t/fontsize/400/fill/i0jbqkfcma==/
Previous section (CI Framework learning Note (i)-environment installation, basic terminology, and framework process) we mentioned the basic process of the CI framework, where we post the flowchart again for reference:
As the CI framework of the entry file, source reading, naturally began. In the process of reading the source code, we will not explain it line by
Use CI. For routing convenience, 404 is configured with a CI code locally. the domain name is set to local. ci. as a result, except that the controller of the homepage autoload can be used, all other controllers are Error 404 !! Local. ci/index. php can run local. ci/index.
In the previous section (CI Framework Learning Notes (i)-environmental installation, basic terminology, and framework process), we mentioned the basic process of the CI framework, and here again the flowchart is posted for reference:
As a CI frame entry file, source code reading, naturally starting from this. In the process of reading the source code, we do not
Last month was invited by the Dockone community to do a CI practice on-line sharing, in this record.This paper describes the architecture and capabilities of GitLab CI, and analyzes its role in DevOps practice. Analyze the technical details of Docker in Docker and describe in detail the CI practices and optimizations made in the production environment, including
CI has a very mature implementation in web-based application, which has accumulated a lot of excellent practice. But are these practices applicable on the Android platform? Does the known CI tool support Android well? Can Android CI also instantly feed the health of Android application? This article will show you how Android
Advice to a new partner: don't think about how complicated it is, see it again and you'll get it!What is the purpose of this integration?Because I have used CI and smarty, so I will say according to their own understanding: The CI framework in the controller, models aspects of doing very well, but in the changeable view I feel that there is no special handling of the view of the Smarty template to do well,
= $enable) {$this->_profiler_sections[$section] = ($enable!== FALSE)? True:false; } return $this; }//--------------------------------------------------------------------/** * Set Cache * Sets Caching and cache time * @access public * @param integer where $time is the number of minutes you want the update to be cached * @return void */function cache ($time) {$this->cache_expiration = (! is_numer IC ($time))? 0: $time; return $this; }//-------------------------------------------------------------
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.