I’m somewhat new to PHP. I wrote static class that I would like to use and call, however when I try to call it I get a fatal because the php class file is not in the same directory as the calling file. Do I have to include it in order to use it?
Share
Yes. Use
includeto include other PHP files. Even if your class file in the same directory, you still need to include it (you can also include files from other directories, obviously).