vkgbiz Posted November 23, 2010 Share Posted November 23, 2010 Hi, is there any way to clear the included file in php? for example, if i included a file like , include "file.php"; after using the functions in this file finally i want to exclude from the list. Quote Link to comment Share on other sites More sharing options...
revraz Posted November 23, 2010 Share Posted November 23, 2010 require_once? Quote Link to comment Share on other sites More sharing options...
raphael1 Posted November 23, 2010 Share Posted November 23, 2010 try using <? include_once("file.php"); ?> Quote Link to comment Share on other sites More sharing options...
vkgbiz Posted November 24, 2010 Author Share Posted November 24, 2010 Thanks raphael1, for your reply. but i solved this problem. actually this problem triggered when i included two files which has the same class name. for example , first.php contains a class called " transaction" and second.php also contains "transaction" class but with different functions in it. when we include both these files(first.php,second.php) it'll trigger the "cannot redclare class" , that is why i asked you how to remove one file that has the same class declaration. i just renamed one class now its works well. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.