I have an external script (sat in the root folder, alongside CI's index.php) that ideally I need to access CI's methods e.g. models.
I found
this article, but its outdated.
I even tried the answer
here, but that didn't work.
So, is there a way to achieve this?
(I fully understand it may not be secure or best practice, I'd just like to know if it's possible, and how to do it)
Why not create a controller that does the job and access it with CLI?
Because I am not able to access the CLI. I specifically need to do it this way.
(03-18-2015, 04:21 AM)ivantcholakov Wrote: [ -> ]You may try to migrate the application. I still support the older CI2 class/file naming convention, probably most of your code will work without modifications. But check the CI2 -> CI3 migration notes: http://www.codeigniter.com/userguide3/in...e_300.html
So I shojuld put the "platform" directory alongside my current CI application?
Or is there a way to use my current CI application with the additional parts you have made? As I can see you include a CI installation inside your "platform" directory, but I don't really want another CI app, when I already have the files for one.
You can move directories, I don't have documentation about it. Just trace code starting from index.php and you will figure out how to rearrange directories as you wish. See this file for example:
https://github.com/ivantcholakov/starter...config.php
Edit: I checked, actually within README.md, in the Installation section there are some words about $PLATFORMPATH.
If you want, you may "merge" the folders www/ and platform/ into one folder that would be your web-server root folder, but I don't recommend that, the installation would be less secure.
Edit 2: For further questions open an issue on the project's page for not polluting the forum here with irrelevant stuff.