Love Fuel?    Donate

FuelPHP Forums

Ask your question about FuelPHP in the appropriate forum, or help others by answering their questions.
how to load existed class?
  • i'm from CI,i have 2 question :- 1)how to $this->load->library('bitly'); in fuel ?
    2)where to put bitly class?
  • This is one of the greatest things about FuelPHP, all classes are automatically loaded when you first use them! So to use your bitly class, all you need to do is instantiate it:
    $bitly = new bitly();
    
    The bitly class would then go into this directory:
    fuel/app/classes/
  • nice.
    thanks.
  • other nice things, is that for example, you have one class, and simply want to call a method1 to return data, you can:
    $result = Classname::methodname();
    
    Good luck

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion