summaryrefslogtreecommitdiffstats
path: root/user_guide
diff options
context:
space:
mode:
authorPhil Sturgeon <email@philsturgeon.co.uk>2011-08-13 18:28:45 +0200
committerPhil Sturgeon <email@philsturgeon.co.uk>2011-08-13 18:28:45 +0200
commit3cf2715501be298ef00166d57a4df39829aa2c09 (patch)
tree9a67222945f8484c3130ec56ab6cc8ef2575ec11 /user_guide
parent6f1b3841b6f660dfbaa5e00df456d793e67fe60f (diff)
parentc4f024641ab69ed9cce62a2864e47e060b81048b (diff)
Merge branch 'develop' of ellislab.beanstalkapp.com:/codeigniter into develop
Diffstat (limited to 'user_guide')
-rw-r--r--user_guide/general/cli.html2
-rw-r--r--user_guide/helpers/url_helper.html16
-rw-r--r--user_guide/libraries/cart.html5
-rw-r--r--user_guide/libraries/config.html5
4 files changed, 24 insertions, 4 deletions
diff --git a/user_guide/general/cli.html b/user_guide/general/cli.html
index 962954b15..ed6fc85a8 100644
--- a/user_guide/general/cli.html
+++ b/user_guide/general/cli.html
@@ -72,7 +72,7 @@ Running via the CLI
<a name="what"></a>
<h2>What is the CLI?</h2>
-<p><dfn>The command-line interface is a text-based method of interacting with computers that looks like what most people remember as DOS.</dfn></p>
+<p><dfn>The command-line interface is a text-based method of interacting with computers.</dfn> For more information, check the <a href="http://en.wikipedia.org/wiki/Command-line_interface">Wikipedia article</a>.</p>
<a name="why"></a>
diff --git a/user_guide/helpers/url_helper.html b/user_guide/helpers/url_helper.html
index d20f1b1e2..ac9d0a68e 100644
--- a/user_guide/helpers/url_helper.html
+++ b/user_guide/helpers/url_helper.html
@@ -70,7 +70,7 @@ URL Helper
<h2>site_url()</h2>
<p>Returns your site URL, as specified in your config file. The index.php file (or whatever you have set as your
-site <dfn>index_page</dfn> in your config file) will be added to the URL, as will any URI segments you pass to the function.</p>
+site <dfn>index_page</dfn> in your config file) will be added to the URL, as will any URI segments you pass to the function, and the <dfn>url_suffix</dfn> as set in your config file.</p>
<p>You are encouraged to use this function any time you need to generate a local URL so that your pages become more portable
in the event your URL changes.</p>
@@ -93,6 +93,20 @@ echo site_url($segments);</code>
<p>Returns your site base URL, as specified in your config file. Example:</p>
<code>echo base_url();</code>
+<p>This function returns the same thing as site_url, without the <dfn>index_page</dfn> or <dfn>url_suffix</dfn> being appended.</p>
+
+<p>Also like site_url, you can supply segments as a string or an array. Here is a string example:</p>
+
+<code>echo base_url("blog/post/123");</code>
+
+<p>The above example would return something like: http://example.com/blog/post/123</p>
+
+<p>This is useful because unlike site_url(), you can supply a string to a file, such as an image or stylesheet. For example:</p>
+
+<code>echo base_url("images/icons/edit.png");</code>
+
+<p>This would give you something like: http://example.com/images/icons/edit.png</p>
+
<h2>current_url()</h2>
<p>Returns the full URL (including segments) of the page being currently viewed.</p>
diff --git a/user_guide/libraries/cart.html b/user_guide/libraries/cart.html
index 81b43e363..2e2beed9c 100644
--- a/user_guide/libraries/cart.html
+++ b/user_guide/libraries/cart.html
@@ -109,7 +109,8 @@ It is intended to be used in cases where your product has options associated wit
<li><strong>options</strong> - Any additional attributes that are needed to identify the product. These must be passed via an array.
</ul>
-<p>In addition to the five indexes above, there are two reserved words: <dfn>rowid</dfn> and <dfn>subtotal</dfn>. These are used internally by the Cart class, so please do NOT use those words as index names when inserting data into the cart.</p>
+<p>In addition to the five indexes above, there are two reserved words: <dfn>rowid</dfn> and <dfn>subtotal</dfn>. These are used internally by the Cart class, so
+please do NOT use those words as index names when inserting data into the cart.</p>
<p>Your array may contain additional data. Anything you include in your array will be stored in the session. However, it is best to standardize your data among all your products in order to make displaying the information in a table easier.</p>
@@ -264,7 +265,7 @@ $this->cart->update($data);
</code>
-<p><strong>What is a Row ID?</strong>&nbsp; The <kbd>row ID</kbd> is a unique identifier that is generated by the cart code when an item is added to the cart. The reason a
+<p><strong>What is a Row ID?</strong>&nbsp; The <kbd>row ID</kbd> is a unique identifier that is generated by the cart code when an item is added to the cart. The reason a
unique ID is created is so that identical products with different options can be managed by the cart.</p>
<p>For example, let's say someone buys two identical t-shirts (same product ID), but in different sizes. The product ID (and other attributes) will be
diff --git a/user_guide/libraries/config.html b/user_guide/libraries/config.html
index 2433ec4ad..be75801e0 100644
--- a/user_guide/libraries/config.html
+++ b/user_guide/libraries/config.html
@@ -194,6 +194,11 @@ $site_name = $blog_config['site_name'];</code>
<h2>$this->config->site_url();</h2>
<p>This function retrieves the URL to your site, along with the "index" value you've specified in the config file.</p>
+<h2>$this->config->base_url();</h2>
+<p>This function retrieves the URL to your site, plus an optional path such as to a stylesheet or image.</p>
+
+<p>The two functions above are normally accessed via the corresponding functions in the <a href="../helpers/url_helper.html">URL Helper.</a></p>
+
<h2>$this->config->system_url();</h2>
<p>This function retrieves the URL to your <dfn>system folder</dfn>.</p>