• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Error 403 or No direct script access allowed

#1
Hello !

I have a problem with a link on my local web site. I try to redirect the user with a controller in a <a href="my_controller">link</a> but I can't make it work.

Or the problem is a 403 error : I can fix it deleting the htaccess file but the problem wich happens is : class CI_controller not found in : class my_controller extends CI_controller {}.

Either the problem is : No direct script access allowed when I put the this line of code : defined('BASEPATH') OR exit('No direct script access allowed'); at the top of my controller file.

It's really boring, I can't work because can't access to my file... I'm working with wamp server but I do have no ideas about what I have to do.

Thank's for reading me,


Axel
Reply

#2
All of your links need to start with index.php file
Reply

#3
Yes, but here the problem was solved easely, I had to put site_url() function in the link. Now, everything is working well.

Thank's a lot,

Axel
Reply


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2021 MyBB Group.