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. Link to comment https://forums.phpfreaks.com/topic/219564-php-include/ Share on other sites More sharing options...
revraz Posted November 23, 2010 Share Posted November 23, 2010 require_once? Link to comment https://forums.phpfreaks.com/topic/219564-php-include/#findComment-1138342 Share on other sites More sharing options...
raphael1 Posted November 23, 2010 Share Posted November 23, 2010 try using <? include_once("file.php"); ?> Link to comment https://forums.phpfreaks.com/topic/219564-php-include/#findComment-1138395 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. Link to comment https://forums.phpfreaks.com/topic/219564-php-include/#findComment-1138923 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.