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==/
Webmaster
Editor: Asia CI network (www. Asiaci.com), professional CI Strategic planning, brand management, visual design Network interactive platform, with more than 70,000 members, total browsing volume of 5 million people, is currently the largest CI information site in Asia.
Asian CI network webmaster Shan, Network
MyEclipse CI as a popular javaide development tool, it has a lot of useful features for our development to provide help. But when we have a lot of projects in our workspace, it's a headache to manage.But we don't want to change the working range, so we need a more effective approach to project management.1. Open myeclipse, you can see the small triangle symbol shown, click Open.2. The popup interface, there is a select Working Set option. Click on Sel
Apache Remove index.php1. Edit the conf/httpd.conf configuration file#LoadModule rewrite_module modules/mod_rewrite.so to remove the # before the lineAlso configure allowoverride all under directory2. Under the CI root directory (that is, under Index.php,system's sibling directory), create a new configuration file named:. htaccess content as follows:Rewriteengine onRewritecond%{request_filename}!-fRewritecond%{request_filename}!-dRewritecond $!^ (inde
This example describes the CI framework file upload class and image processing class usage. Share to everyone for your reference, specific as follows:
List page banner picture public function Edit_list_page_banner ($category _id= "") {$category _id= empty ($category _id)? $_post["
category_id "]: $category _id; Upload picture if (isset ($_post["key")) $_post["key"] = = "Upload") {/* 1.set_upload_path * * $config [' Uploa D_path ']= './upload/
access to search results, or just declare them. New support for formatting selected JavaScript blocks instead of formatting the entire file. Fixed several bugs for Outline and Quick Outline views. Outline view can follow the code display normally and can be quickly navigated by quick Outline. Fixes some bugs in call Hierarchy view to better handle more advanced JavaScript code. Jsdebugger-source maps works well when debugging a Node.js 6.x application.
Terminal, Snippets View and Docker Comm
The use of CI frameworks often encounters jumps and path problems, Site_url () and Base_url () are easy to confuse, and here's the difference!
If the Base_url and index_page in your config file are defined in this way:
config[' base_url ' = "http://domain.com/";
config[' index_page ' = "index.php";
Then if you use Site_url ("NEWS/PHP/2"), the actual URL is
Http://domain.com/index.php/news/php/2
If you use Base_url ("NEWS/PHP/2"), the URL is:
Ht
In the integration of HTML page inside the CI frame, loading css and JS failed, get a long time to find the CI framework is the framework of the portal, all the files in the framework of the request need to go through index.php processing, when loading external CSS and JS file to use the Base_ The URL () function handles external links.
Like what:
The base_url in the Config profile is: "localhost:8080/P
When the HTML page is integrated into the CI frame, loading css and JS fails, and I find that the CI framework is the portal framework,
All requests for files in the framework need to be processed by index.php, and when loading external CSS and JS files, make
Use the Base_url () function to handle external links.
Like what:
The base_url in the Config profile is: "localhost:8080/Project name/"
accessing
The examples in this article describe the common function encapsulation of the CI framework. Share to everyone for your reference, specific as follows:
/** * Package Query Function/Public function get_what ($table = ', $where =array (), $fields = ' * ') {if ("= = $table)" {return
False
//query and return related results $query = $this->db->select ($fields)->where ($where)->get ($table);
$res = $query->result_array ();
return $res; /*
The examples in this article describe the operational steps and methods for the CI framework's dependent packages that are installed using composer. Share to everyone for your reference, specific as follows:
This article for Linux Systems, Windows first step according to the composer official website to install the following steps are the same
Step 1 Global installation composer
$ CURL-SS Https://getcomposer.org/installer | PHP
$ mv Composer
CodeIgniter is a small but powerful PHP framework that can be used as a simple and "elegant" toolkit to build a full-featured WEB application for developers. is a more mainstream PHP framework.
Here is a description of the CI framework (Ajax paging, select all, reverse, not select, bulk Delete) complete code, the specific code is as follows:
Ajax Paging + search (view layer) function Ajax_page (page) {var sou = $ (' #sou '). Val (); $.ajax ({typ
CI framework source code reading --------- Output. php lt ;? Phpif (! Defined (BASEPATH) exit (Nodirectscriptaccessallowed); *** CodeIgniter *** Anopensourceapplicationdevelopmentframeworkfo CI framework source code reading --------- Output. php
_ Zlib_oc // if the output compression function is enabled in the configuration item, the value of $ this-> _ zlib_oc is on $ this-> _ zlib_oc = @ ini_get ('zli
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.