0

I have a fatal error

Call to undefined function url()

But I have

$autoload['helper'] = array('url');

I my autoload.php

I am pretty new to CI. In advance, sorry my lack of understanding

1

1 Answer 1

1

There is no error with it.

So if you calling your base url, then you have to use base_url() keyword.

And in config/config.php file

  1. Base url should be empty
  2. And index also should be empty

For example

If you use <a> tag lke this

<a href="root_folder_name/file_name

But now with Codeigniter MVC

<a href="<?php echo base_url() ?>controller_name/method_name
Sign up to request clarification or add additional context in comments.

2 Comments

I just tried to use <?php echo url('write something', 'test/write'); ?> Isn't it the thing to do ?
No you have to use <?php echo base_url() ?>/test/write

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.