Hi,

Does require_once("myclass.class"); adds overhead to php page if it is not necessarly needed for current page?

I ask this because i was thinking to add all classes in header.php and call header.php in every other pages even some classes are not needed for some pages.

Thanks

Recommended Answers

All 2 Replies

I'm not sure what you mean by overhead but if you are meaning will it take more cpu and longer to load then yes is the answer. And is that a java class because they are meant to be called via html code and not php unless you have worked out how to make php communicate with java.

Yes i meant to say cpu power and memory usage.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.