Hi,

i want to make a script which manage registered user. so for that i need to include files in php. it is simple to include any file by include function . but i want to include a file by class in php.

Please tell me how can i do that ?

So i call that function on start on page and use all files specified in function.

Gajendra Kumar

Recommended Answers

show the code you have so far.

Jump to Post

All 2 Replies

Member Avatar

show the code you have so far.

You could always add all of the files to the include path, so that they're already loaded into memory. This is how a lot of frameworks operate.

set_include_path(implode(PATH_SEPARATOR, array(
    '/path/to/classes/directory',
    get_include_path(),
));
Be a part of the DaniWeb community

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