× {{alert.msg}} Never ask again
Get notified about new tutorials RECEIVE NEW TUTORIALS

How to solve URL errors in CodeIgniter

<p>When you get the following errors in <strong>Codeigniter</strong></p> <ul> <li><span style="color:#B22222"><strong><em>Error: Call to undefined function base_url();</em></strong></span></li> <li><span style="color:#B22222"><strong><em>Error: Call to undefined function site_url();</em></strong></span></li> </ul> <p>You can insert this line within the constructor in your controller</p> <pre><code class="language-php">$this-&gt;load-&gt;helper('url');</code></pre> <p>Or better yet, load it Globally in the autoload configuration: /yourdirectory/config/autoload.php, on <strong>Line 70</strong></p> <pre><code class="language-php">$autoload['helper'] = array('url');</code></pre> <p>Happy Coding. :)</p> <p> </p> <p> </p> <p> </p>

Get New Tutorials Delivered to Your Inbox

New tutorials will be sent to your Inbox once a week.

comments powered by Disqus