From ff845f94cc8876bc6c23c2f55b695bc569038512 Mon Sep 17 00:00:00 2001
From: Derek Jones Deletes the cache files associated with a particular page. This is useful if you need to clear caching after you update your database. The caching system saves your cache files to folders that correspond to the URI of the page you are viewing. For example, if you are viewing
-a page at www.your-site.com/index.php/blog/comments, the caching system will put all cache files associated with it in a folder
+a page at example.com/index.php/blog/comments, the caching system will put all cache files associated with it in a folder
called blog+comments. To delete those particular cache files you will use: The first parameter is the table name, the second is an associative array with the data to be inserted. The above example produces: Note: Values are automatically escaped, producing safer queries. The first parameter is the table name, the second is an associative array with the data to be updated, and the third parameter is the "where" clause. The above example produces: Note: Values are automatically escaped, producing safer queries. Consider this URI: In the above example, CodeIgniter would attempt to find a controller named blog.php and load it. Now visit the your site using a URL similar to this: If you did it right, you should see Hello World!. In the above example the function name is index(). The "index" function is always loaded by default if the
second segment of the URI is empty. Another way to show your "Hello World" message would be this: The second segment of the URI determines which function in the controller gets called. Now load the following URL to see the comment function: You should see your new message. For example, lets say you have a URI like this: Your function will be passed URI segments 3 and 4 ("sandals" and "123"): Trying to access it via the URL, like this, will not work:$this->db->cache_delete('blog', 'comments');
diff --git a/user_guide/database/helpers.html b/user_guide/database/helpers.html
index 10598f8a8..73c541269 100644
--- a/user_guide/database/helpers.html
+++ b/user_guide/database/helpers.html
@@ -110,7 +110,7 @@ $str = $this->db->insert_string('table_name', $data);
INSERT INTO table_name (name, email, url) VALUES ('Rick', 'rick@your-site.com', 'www.your-site.com')
+INSERT INTO table_name (name, email, url) VALUES ('Rick', 'rick@example.com', 'example.com')
UPDATE table_name SET name = 'Rick', email = 'rick@your-site.com', url = 'www.your-site.com' WHERE author_id = 1 AND status = 'active'
+ UPDATE table_name SET name = 'Rick', email = 'rick@example.com', url = 'example.com' WHERE author_id = 1 AND status = 'active'
www.your-site.com/index.php/blog/
+example.com/index.php/blog/
www.your-site.com/index.php/blog/
+example.com/index.php/blog/
www.your-site.com/index.php/blog/index/
+example.com/index.php/blog/index/
www.your-site.com/index.php/blog/comments/
+example.com/index.php/blog/comments/
www.your-site.com/index.php/products/shoes/sandals/123
+example.com/index.php/products/shoes/sandals/123
www.your-site.com/index.php/blog/_utility/
+example.com/index.php/blog/_utility/
@@ -305,7 +305,7 @@ located here:
To call the above controller your URI will look something like this:
-www.your-site.com/index.php/products/shoes/show/123
+example.com/index.php/products/shoes/show/123
Each of your sub-folders may contain a default controller which will be called if the URL contains only the sub-folder. Simply name your default controller as specified in your diff --git a/user_guide/general/routing.html b/user_guide/general/routing.html index b282e18d8..f3e7995a8 100644 --- a/user_guide/general/routing.html +++ b/user_guide/general/routing.html @@ -60,7 +60,7 @@ URI Routing
Typically there is a one-to-one relationship between a URL string and its corresponding controller class/method. The segments in a URI normally follow this pattern:
-www.your-site.com/class/function/id/
+example.com/class/function/id/
In some instances, however, you may want to remap this relationship so that a different class/function can be called instead of the one corresponding to the URL.
@@ -68,10 +68,10 @@ instead of the one corresponding to the URL.For example, lets say you want your URLs to have this prototype:
-www.your-site.com/product/1/
-www.your-site.com/product/2/
-www.your-site.com/product/3/
-www.your-site.com/product/4/
+example.com/product/1/
+example.com/product/2/
+example.com/product/3/
+example.com/product/4/
Normally the second segment of the URL is reserved for the function name, but in the example above it instead has a product ID.
diff --git a/user_guide/general/scaffolding.html b/user_guide/general/scaffolding.html
index 417cb1005..14eed1718 100644
--- a/user_guide/general/scaffolding.html
+++ b/user_guide/general/scaffolding.html
@@ -113,12 +113,12 @@ class Blog extends Controller {
Once you've initialized scaffolding, you will access it with this URL prototype:
-www.your-site.com/index.php/class/secret_word/
+example.com/index.php/class/secret_word/
For example, using a controller named Blog, and abracadabra as the secret word, you would access scaffolding like this:
-www.your-site.com/index.php/blog/abracadabra/
+example.com/index.php/blog/abracadabra/
The scaffolding interface should be self-explanatory. You can add, edit or delete records.
diff --git a/user_guide/general/urls.html b/user_guide/general/urls.html index 9230f98c8..bbfd009ce 100644 --- a/user_guide/general/urls.html +++ b/user_guide/general/urls.html @@ -61,7 +61,7 @@ URLSBy default, URLs in CodeIgniter are designed to be search-engine and human friendly. Rather than using the standard "query string" approach to URLs that is synonymous with dynamic systems, CodeIgniter uses a segment-based approach:
-www.your-site.com/news/article/my_article
+example.com/news/article/my_article
Note: Query string URLs can be optionally enabled, as described below.
@@ -69,7 +69,7 @@ approach to URLs that is synonymous with dynamic systems, CodeIgniter uses awww.your-site.com/class/function/ID
+example.com/class/function/ID
By default, the index.php file will be included in your URLs:
-www.your-site.com/index.php/news/article/my_article
+example.com/index.php/news/article/my_article
You can easily remove this file by using a .htaccess file with some simple rules. Here is an example of such a file, using the "negative" method in which everything is redirected except the specified items:
@@ -105,11 +105,11 @@ a request for your index.php file.In your config/config.php file you can specify a suffix that will be added to all URLs generated by CodeIgniter. For example, if a URL is this:
-www.your-site.com/index.php/products/view/shoes
+example.com/index.php/products/view/shoes
You can optionally add a suffix, like .html, making the page appear to be of a certain type:
-www.your-site.com/index.php/products/view/shoes.html
+example.com/index.php/products/view/shoes.html
If you visit the your site using the URL you did earlier you should see your new view. The URL was similar to this:
-www.your-site.com/index.php/blog/
+example.com/index.php/blog/
CodeIgniter will intelligently handle multiple calls to $this->load->view from within a controller. If more then one call happens they will be appended together. For example, you may wish to have a header view, a menu view, a content view, and a footer view. That might look something like this:
diff --git a/user_guide/helpers/form_helper.html b/user_guide/helpers/form_helper.html index 5e556dca2..3f1e87a27 100644 --- a/user_guide/helpers/form_helper.html +++ b/user_guide/helpers/form_helper.html @@ -84,7 +84,7 @@ in the event your URLs ever change.The above example would create a form that points to your base URL plus the "email/send" URI segments, like this:
-<form method="post" action="http:/www.your-site.com/index.php/email/send" />
+<form method="post" action="http:/example.com/index.php/email/send" />
The above example would create a form similar to this:
-<form method="post" action="http:/www.your-site.com/index.php/email/send" class="email" id="myform" />
+<form method="post" action="http:/example.com/index.php/email/send" class="email" id="myform" />
The above example would create a form similar to this:
-<form method="post" action="http:/www.your-site.com/index.php/email/send">
+<form method="post" action="http:/example.com/index.php/email/send">
<input type="hidden" name="username" value="Joe" />
<input type="hidden" name="member_id" value="234" />
@@ -134,7 +134,7 @@ which is necessary if you would like to use the form to upload files with.
$data = array(
'name' => 'John Doe',
'email' => 'john@example.com',
- 'url' => 'http://www.example.com'
+ 'url' => 'http://example.com'
);
echo form_hidden($data);
@@ -142,7 +142,7 @@ echo form_hidden($data);
// Would produce:
<input type="hidden" name="name" value="John Doe" />
<input type="hidden" name="email" value="john@example.com" />
-<input type="hidden" name="url" value="http://www.example.com" />
+<input type="hidden" name="url" value="http://example.com" />
diff --git a/user_guide/helpers/smiley_helper.html b/user_guide/helpers/smiley_helper.html
index 7b59ec20b..a82ebd2b9 100644
--- a/user_guide/helpers/smiley_helper.html
+++ b/user_guide/helpers/smiley_helper.html
@@ -111,7 +111,7 @@ class Smileys extends Controller {
$this->load->helper('smiley');
$this->load->library('table');
- $image_array = get_clickable_smileys('http://www.your-site.com/images/smileys/');
+ $image_array = get_clickable_smileys('http://example.com/images/smileys/');
$col_array = $this->table->make_columns($image_array, 8);
@@ -160,7 +160,7 @@ class Smileys extends Controller {
Returns an array containing your smiley images wrapped in a clickable link. You must supply the URL to your smiley folder via the first parameter:
-$image_array = get_clickable_smileys("http://www.your-site.com/images/smileys/");
+$image_array = get_clickable_smileys("http://example.com/images/smileys/");
The above would generate 30 newlines.
Converts double slashes in a string to a single slash, except those found in http://. Example:
-$string = "http://www.example.com//index.php";
-echo reduce_double_slashes($string); // results in "http://www.example.com/index.php"
+$string = "http://example.com//index.php";
+echo reduce_double_slashes($string); // results in "http://example.com/index.php"
Removes any leading/trailing slashes from a string. Example:
diff --git a/user_guide/helpers/url_helper.html b/user_guide/helpers/url_helper.html
index 2c0b255d8..aaf4ae480 100644
--- a/user_guide/helpers/url_helper.html
+++ b/user_guide/helpers/url_helper.html
@@ -79,7 +79,7 @@ in the event your URL changes.
echo site_url("news/local/123");
-The above example would return something like: http://www.your-site.com/index.php/news/local/123
+The above example would return something like: http://example.com/index.php/news/local/123
Here is an example of segments passed as an array:
@@ -104,7 +104,7 @@ echo site_url($segments);Creates a standard HTML anchor link based on your local site URL:
-<a href="http://www.your-site.com">Click Here</a>
+<a href="http://example.com">Click Here</a>
The tag has three optional parameters:
@@ -124,11 +124,11 @@ will be added automatically from the information specified in your config file.echo anchor('news/local/123', 'My News');
-Would produce: <a href="http://www.your-site.com/index.php/news/local/123" title="My News">My News</a>
+Would produce: <a href="http://example.com/index.php/news/local/123" title="My News">My News</a>
echo anchor('news/local/123', 'My News', array('title' => 'The best news!'));
-Would produce: <a href="http://www.your-site.com/index.php/news/local/123" title="The best news!">My News</a>
+Would produce: <a href="http://example.com/index.php/news/local/123" title="The best news!">My News</a>
This function will add http:// in the event it is missing from a URL. Pass the URL string to the function like this:
-$url = "www.example.com";
+$url = "example.com";
$url = prep_url($url);
diff --git a/user_guide/installation/upgrade_130.html b/user_guide/installation/upgrade_130.html
index 9c91adae2..8e34e2521 100644
--- a/user_guide/installation/upgrade_130.html
+++ b/user_guide/installation/upgrade_130.html
@@ -131,12 +131,12 @@ replace this folder:
| This option allows you to add a suffix to all URLs.
| For example, if a URL is this:
|
-| www.your-site.com/index.php/products/view/shoes
+| example.com/index.php/products/view/shoes
|
| You can optionally add a suffix, like ".html",
| making the page appear to be of a certain type:
|
-| www.your-site.com/index.php/products/view/shoes.html
+| example.com/index.php/products/view/shoes.html
|
*/
$config['url_suffix'] = "";
@@ -150,18 +150,18 @@ $config['url_suffix'] = "";
| By default CodeIgniter uses search-engine and
| human-friendly segment based URLs:
|
-| www.your-site.com/who/what/where/
+| example.com/who/what/where/
|
| You can optionally enable standard query string
| based URLs:
|
-| www.your-site.com?who=me&what=something&where=here
+| example.com?who=me&what=something&where=here
|
| Options are: TRUE or FALSE (boolean)
|
| The two other items let you set the query string "words"
| that will invoke your controllers and functions:
-| www.your-site.com/index.php?c=controller&m=function
+| example.com/index.php?c=controller&m=function
|
*/
$config['enable_query_strings'] = FALSE;
diff --git a/user_guide/libraries/calendar.html b/user_guide/libraries/calendar.html
index 81cdc7134..dd24d9d22 100644
--- a/user_guide/libraries/calendar.html
+++ b/user_guide/libraries/calendar.html
@@ -97,10 +97,10 @@ generating function. Consider this example:
$this->load->library('calendar');
$data = array(
- 3 => 'http://your-site.com/news/article/2006/03/',
- 7 => 'http://your-site.com/news/article/2006/07/',
- 13 => 'http://your-site.com/news/article/2006/13/',
- 26 => 'http://your-site.com/news/article/2006/26/'
+ 3 => 'http://example.com/news/article/2006/03/',
+ 7 => 'http://example.com/news/article/2006/07/',
+ 13 => 'http://example.com/news/article/2006/13/',
+ 26 => 'http://example.com/news/article/2006/26/'
);
echo $this->calendar->generate(2006, 6, $data);
@@ -168,7 +168,7 @@ code similar to this example:
$prefs = array (
'show_next_prev' => TRUE,
- 'next_prev_url' => 'http://www.your-site.com/index.php/calendar/show/'
+ 'next_prev_url' => 'http://example.com/index.php/calendar/show/'
);
$this->load->library('calendar', $prefs);
diff --git a/user_guide/libraries/email.html b/user_guide/libraries/email.html
index e8325431a..88c63f046 100644
--- a/user_guide/libraries/email.html
+++ b/user_guide/libraries/email.html
@@ -83,7 +83,7 @@ Email Class
$this->load->library('email');
-$this->email->from('your@your-site.com', 'Your Name');
+$this->email->from('your@example.com', 'Your Name');
$this->email->to('someone@example.com');
$this->email->cc('another@another-example.com');
$this->email->bcc('them@their-example.com');
@@ -185,11 +185,11 @@ will NOT need to use the $this->email->initialize() function if you s
$this->email->from()
Sets the email address and name of the person sending the email:
-$this->email->from('you@your-site.com', 'Your Name');
+$this->email->from('you@example.com', 'Your Name');
$this->email->reply_to()
Sets the reply-to address. If the information is not provided the information in the "from" function is used. Example:
-$this->email->reply_to('you@your-site.com', 'Your Name');
+$this->email->reply_to('you@example.com', 'Your Name');
$this->email->to()
@@ -235,7 +235,7 @@ in a loop, permitting the data to be reset between cycles.
$this->email->clear();
$this->email->to($address);
- $this->email->from('your@your-site.com');
+ $this->email->from('your@example.com');
$this->email->subject('Here is your info '.$name);
$this->email->message('Hi '.$name.' Here is the info you requested.');
$this->email->send();
@@ -280,7 +280,7 @@ word wrapping within part of your message like this:
The text of your email that
gets wrapped normally.
-{unwrap}http://www.example.com/a_long_link_that_should_not_be_wrapped.html{/unwrap}
+{unwrap}http://example.com/a_long_link_that_should_not_be_wrapped.html{/unwrap}
More text that will be
wrapped normally.
diff --git a/user_guide/libraries/file_uploading.html b/user_guide/libraries/file_uploading.html
index 583173552..5ac2768d1 100644
--- a/user_guide/libraries/file_uploading.html
+++ b/user_guide/libraries/file_uploading.html
@@ -194,7 +194,7 @@ class Upload extends Controller {
To try your form, visit your site using a URL similar to this one:
-www.your-site.com/index.php/upload/
+example.com/index.php/upload/
You should see an upload form. Try uploading an image file (either a jpg, gif, or png). If the path in your
controller is correct it should work.
diff --git a/user_guide/libraries/ftp.html b/user_guide/libraries/ftp.html
index 1e2b7de40..450ca98bd 100644
--- a/user_guide/libraries/ftp.html
+++ b/user_guide/libraries/ftp.html
@@ -79,7 +79,7 @@ file permissions are set to 755. Note: Setting permissions requires PHP 5.
$this->load->library('ftp');
-$config['hostname'] = 'ftp.your-site.com';
+$config['hostname'] = 'ftp.example.com';
$config['username'] = 'your-username';
$config['password'] = 'your-password';
$config['debug'] = TRUE;
@@ -98,7 +98,7 @@ $this->ftp->close();
$this->load->library('ftp');
-$config['hostname'] = 'ftp.your-site.com';
+$config['hostname'] = 'ftp.example.com';
$config['username'] = 'your-username';
$config['password'] = 'your-password';
$config['debug'] = TRUE;
@@ -118,7 +118,7 @@ $this->ftp->close();
$this->load->library('ftp');
-$config['hostname'] = 'ftp.your-site.com';
+$config['hostname'] = 'ftp.example.com';
$config['username'] = 'your-username';
$config['password'] = 'your-password';
$config['debug'] = TRUE;
@@ -144,7 +144,7 @@ to the function, or you can store them in a config file.
$this->load->library('ftp');
-$config['hostname'] = 'ftp.your-site.com';
+$config['hostname'] = 'ftp.example.com';
$config['username'] = 'your-username';
$config['password'] = 'your-password';
$config['port'] = 21;
diff --git a/user_guide/libraries/pagination.html b/user_guide/libraries/pagination.html
index 65529be43..a631aa462 100644
--- a/user_guide/libraries/pagination.html
+++ b/user_guide/libraries/pagination.html
@@ -70,7 +70,7 @@ Pagination Class
$this->load->library('pagination');
-$config['base_url'] = 'http://www.your-site.com/index.php/test/page/';
+$config['base_url'] = 'http://example.com/index.php/test/page/';
$config['total_rows'] = '200';
$config['per_page'] = '20';
@@ -121,9 +121,9 @@ something different you can specify it.
will place two digits on either side, as in the example links at the very top of this page.
$config['page_query_string'] = TRUE
By default, the pagination library assume you are using URI Segments, and constructs your links something like
-http://www.your-site.com/index.php/test/page/20
+http://example.com/index.php/test/page/20
If you have $config['enable_query_strings'] set to TRUE your links will automatically be re-written using Query Strings. This option can also be explictly set. Using $config['page_query_string'] set to TRUE, the pagination link will become.
-http://www.your-site.com/index.php?c=test&m=page&per_page=20
+http://example.com/index.php?c=test&m=page&per_page=20
Note that "per_page" is the default query string passed, however can be configured using $config['query_string_segment'] = 'your_string'
Adding Enclosing Markup
diff --git a/user_guide/libraries/trackback.html b/user_guide/libraries/trackback.html
index b8284ea93..28ac19238 100644
--- a/user_guide/libraries/trackback.html
+++ b/user_guide/libraries/trackback.html
@@ -133,7 +133,7 @@ able to associate it with a particular entry.
For example, if your controller class is called Trackback, and the receiving function is called receive, your
Ping URLs will look something like this:
-http://www.your-site.com/index.php/trackback/receive/entry_id
+http://example.com/index.php/trackback/receive/entry_id
Where entry_id represents the individual ID number for each of your entries.
@@ -198,7 +198,7 @@ $this->trackback->send_success();
The entry ID number is expected in the third segment of your URL. This is based on the URI example we gave earlier:
-http://www.your-site.com/index.php/trackback/receive/entry_id
+http://example.com/index.php/trackback/receive/entry_id
Notice the entry_id is in the third URI segment, which you can retrieve using:
diff --git a/user_guide/libraries/uri.html b/user_guide/libraries/uri.html
index 75f575453..97275f0f6 100644
--- a/user_guide/libraries/uri.html
+++ b/user_guide/libraries/uri.html
@@ -68,7 +68,7 @@ also retrieve information about the re-routed segments.
Permits you to retrieve a specific segment. Where n is the segment number you wish to retrieve.
Segments are numbered from left to right. For example, if your full URL is this:
-http://www.your-site.com/index.php/news/local/metro/crime_is_up
+http://example.com/index.php/news/local/metro/crime_is_up
The segment numbers would be this:
@@ -187,7 +187,7 @@ $str = $this->uri->assoc_to_uri($array);
Returns a string with the complete URI. For example, if this is your full URL:
-http://www.your-site.com/index.php/news/local/345
+http://example.com/index.php/news/local/345
The function would return this:
diff --git a/user_guide/libraries/validation.html b/user_guide/libraries/validation.html
index b04f9f6b7..aee9e31c1 100644
--- a/user_guide/libraries/validation.html
+++ b/user_guide/libraries/validation.html
@@ -190,7 +190,7 @@ class Form extends Controller {
To try your form, visit your site using a URL similar to this one:
-www.your-site.com/index.php/form/
+example.com/index.php/form/
If you submit the form you should simply see the form reload. That's because you haven't set up any validation
rules yet, which we'll get to in a moment.
diff --git a/user_guide/libraries/xmlrpc.html b/user_guide/libraries/xmlrpc.html
index e3d519037..0d842d51c 100644
--- a/user_guide/libraries/xmlrpc.html
+++ b/user_guide/libraries/xmlrpc.html
@@ -391,7 +391,7 @@ class Xmlrpc_server extends Controller {
Try it!
Now visit the your site using a URL similar to this:
-www.your-site.com/index.php/xmlrpc_client/
+example.com/index.php/xmlrpc_client/
You should now see the message you sent to the server, and its response back to you.
diff --git a/user_guide/overview/at_a_glance.html b/user_guide/overview/at_a_glance.html
index 6dc9287b7..0a9fa53b3 100644
--- a/user_guide/overview/at_a_glance.html
+++ b/user_guide/overview/at_a_glance.html
@@ -97,7 +97,7 @@ This is particularly good for projects in which designers are working with your
The URLs generated by CodeIgniter are clean and search-engine friendly. Rather than using the standard "query string"
approach to URLs that is synonymous with dynamic systems, CodeIgniter uses a segment-based approach:
-www.your-site.com/news/article/345
+example.com/news/article/345
Note: By default the index.php file is included in the URL but it can be removed using a simple .htaccess file.
--
cgit v1.2.3-24-g4f1b