CodeIgniter Forums
With use controller and models through a file external? - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forum-20.html)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forum-23.html)
+--- Thread: With use controller and models through a file external? (/thread-36387.html)



With use controller and models through a file external? - El Forum - 11-30-2010

[eluser]Spectruman[/eluser]
I have a file outside the application in this sense I wanted to reuse the controls, models and view the file that is outside.


With use controller and models through a file external? - El Forum - 11-30-2010

[eluser]Bart Mebane[/eluser]
I'm not sure I understand your question, but in your index.php file you can set the path to your application folder. It can be outside your public html folder.


With use controller and models through a file external? - El Forum - 11-30-2010

[eluser]Spectruman[/eluser]
[quote author="Bart Mebane" date="1291140880"]I'm not sure I understand your question, but in your index.php file you can set the path to your application folder. It can be outside your public html folder.[/quote]

I’m access need in access ci controller and models from by script external PHP. Calling CI sample $ci = &get;_instance (how does a library for example) and i get the object ci.


With use controller and models through a file external? - El Forum - 11-30-2010

[eluser]Bart Mebane[/eluser]
CI is initialized through www.example.com/index.php. If you bypass index.php and execute a different script like www.example.com/myscript.php then CI won't be running.


With use controller and models through a file external? - El Forum - 11-30-2010

[eluser]Spectruman[/eluser]
[quote author="Bart Mebane" date="1291153487"]CI is initialized through www.example.com/index.php. If you bypass index.php and execute a different script like www.example.com/myscript.php then CI won't be running.[/quote]

What I need is like this example.
http://codeigniter.com/wiki/Calling_CI_models_from_outside_script
I do not get it to work by example, but I need to do.


With use controller and models through a file external? - El Forum - 11-30-2010

[eluser]Bart Mebane[/eluser]
Now I understand what you're trying to do, but it involves a significant modification to CI itself and I don't have any experience with it. Some of the other forum members may be able to help you. When you ask questions, try to provide the exact error messages that you're seeing, and post enough of your code so that people will be able to follow what you're trying to do. Sorry I can't be of more help.