I have several classes in PHP. All separated in files. (class1.php, class2.php)
On my site, I have included them all together, so I can use all of them.
Now, when I use jQuery Ajax
to get data from the database I have to call another file (like getData.php)
But on this file, I have to include all of the classes (or at least some) again. So every time I want to receive data from the database, it loads all classes again(I think). The problem is, that they're not that small and they are still growing. That's bad, I think.
Is there a way to avoid this? So that I include the classes only once.