Autoload not workig ?? or what I'm doing wrong?

91 views
Skip to first unread message

Uroš Likar

unread,
Oct 30, 2016, 7:04:54 AM10/30/16
to Fat-Free Framework
I'm using fatfree for the first time and I can't make my classes work from a subfolder. I checked few tutorials but sill I can't make it work.



If anyone can check posted screenshot and tell me what the hell I'm doing wrong.


https://www.dropbox.com/s/u4lpa7id037s0yv/fatfree.JPG?dl=0

If I move classes inside index.php, then it works.

Rayne

unread,
Oct 30, 2016, 11:16:59 AM10/30/16
to Fat-Free Framework
Please test the following snippet:

$f3->set('AUTOLOAD', 'classes/');


Uroš Likar

unread,
Oct 30, 2016, 2:21:53 PM10/30/16
to Fat-Free Framework
I had that before but it doesn't work neither.

At beggining I had one class inside classes folder but I couldn't make it work so I tryed various combinations.

Dne nedelja, 30. oktober 2016 16.16.59 UTC+1 je oseba Rayne napisala:

Anatol Buchholz

unread,
Oct 30, 2016, 2:45:25 PM10/30/16
to f3-fra...@googlegroups.com
What happens if you rename folder main to Main or set namespace Main to lowercase?
Further check if the .htaccess is interpreted. To check this you could do a quick check
if the composer example is working correctly (if you use composer )

This should not be a problem but just to be safe. Did you set AUTOLOAD in your config
as well?

Uroš Likar

unread,
Oct 30, 2016, 3:31:56 PM10/30/16
to Fat-Free Framework
Ah... thanx for the tip about .htaccess file. I moved my app from original location and forgot to fix htaccess file. I noticed that when I called one class in / root where it worked.

Now all works as it should.


Dne nedelja, 30. oktober 2016 19.45.25 UTC+1 je oseba Anatol Buchholz napisala:

Anatol Buchholz

unread,
Oct 30, 2016, 4:53:40 PM10/30/16
to Fat-Free Framework
Happy to hear ;)
Reply all
Reply to author
Forward
0 new messages