-1

I have some classes, and a functions.php file, which needs to be loaded on every PHP page I script. (Because some pages could individually get called by $.ajax)

I googled, but couldn't get further than the __autoload function.

Let's say I have 100 pages, with 10 function files and 10 class files in 3 other directories. It would be kind of hard to load them into every page and get the relative paths good from every page, it's impossible.

So the perfect situation would be to call every class/function file ONCE, on index.php and never have to call them again. Is this possible?

How would you call all your classes and function files to use in your website?

Thank you!

4

1 回答 1

-4

include_once('这里的文件路径')

于 2012-12-09T00:25:14.163 回答