Menu

How to use one model into two codeigniter projects?

+1 vote

How to use one model into two codeigniter projects. means I have only one model file in my codeigniter project and use it into another codeigniter projects directly. Is there any way to do this???

asked Jan 24 by Devman (590 points)

1 Answer

0 votes
 
Best answer

If both projects are on same dir, try adding path to load function.

$this->load->model("../../anotherapp/models/test_model","model");

Other alternative is including PHP file and instance a model object.

answered Jan 24 by domingez (950 points)
selected Jan 24 by Devman
Welcome to Ask.CodeIgniter, where you can ask questions and receive answers from other members of the community.
 | Mediacode Theme
Powered by Question2Answer
...