Welcome Guest, Not a member yet? Register   Sign In
How to access CI model in a plain php file?
#4

(This post was last modified: 10-16-2018, 09:50 AM by happyape.)

(10-16-2018, 08:30 AM)InsiteFX Wrote: Did you try to include the model?

Did you mean include e.g. include_once dirname(dirname(dirname(dirname(__FILE__)))).'/application/Models/StarModel.php';

It gives me this error -
Code:
Fatal error: Class 'CodeIgniter\Model' not found in .../Models/StarModel.php

I think I just have to figure out how to set a psr-4 in composer somewhere as this file is outside Application folder i.e. inside Public/star/ratings.php
Reply


Messages In This Thread
RE: How to access CI model in a plain php file? - by happyape - 10-16-2018, 09:40 AM



Theme © iAndrew 2016 - Forum software by © MyBB