![]() |
No direct script access allowed - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: CodeIgniter 4 (https://forum.codeigniter.com/forumdisplay.php?fid=28) +--- Forum: CodeIgniter 4 Support (https://forum.codeigniter.com/forumdisplay.php?fid=30) +--- Thread: No direct script access allowed (/showthread.php?tid=86275) |
No direct script access allowed - nadeem14375 - 01-25-2023 hi, I am converting my CI3 application to CI4. I am facing this error No direct script access allowed I have included the following code, but it always, says Code: No direct script access allowed Code: <?php RE: No direct script access allowed - kenjis - 01-25-2023 BASEPATH is not defined in CI4. Remove the line "defined('BASEPATH') OR exit('No direct script access allowed');", or define BASEPATH by yourself. RE: No direct script access allowed - nadeem14375 - 01-25-2023 (01-25-2023, 11:15 PM)kenjis Wrote: BASEPATH is not defined in CI4. hi, can you share some example? I am new, how can define it? RE: No direct script access allowed - kenjis - 01-25-2023 I recommend you remove the line in all your files. Because it is not necessary in CI4. Add this in app/Config/Constants.php: PHP Code: define('BASEPATH', 'whatever'); |