1

I searched other posts and tried creating a helper function to create an asset_url as explained in this post, but no luck. I previously had to set the base site in my config.php file as such: $config['base_url'] = 'http://localhost:8081/ci';.

The code in my application\views\layouts\main.php file, just before the closing body tag is:

<script src=<?php echo base_url();?>assets/js/jquery.js"></script> <script src=<?php echo base_url();?>assets/js/bootstrap.min.js"></script>

I'm running on XAMPP. I had to change the port number to 8081 after installing visual stuido and it conflicted with the default port 80. So my exact queston is what else can I do to resolve the 403 forbidden access in code igniter so that JS and Jquery scripts will work?

3
  • Seems like you have restricted its access in your .htaccess file Commented Mar 12, 2016 at 2:53
  • 2
    Put DIRECTORY_SEPARATOR at the end: $config['base_url'] = 'http://localhost:8081/ci/';. You forgot opening double quotes for src. Commented Mar 12, 2016 at 3:37
  • Thank you! Scripts work now. Commented Mar 12, 2016 at 5:42

0

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.