ShoeLace1291 Posted February 15, 2011 Share Posted February 15, 2011 I'm trying to make my own framework along the lines of CodeIgniter's basic structure. I was wondering if there's a way to automatically re-load a class? Quote Link to comment https://forums.phpfreaks.com/topic/227692-re-autoload-class/ Share on other sites More sharing options...
trq Posted February 15, 2011 Share Posted February 15, 2011 Re-loading a class will result in an error because you can only define a class once. You need to be a little more descriptive of exactly what it is your trying to do. Quote Link to comment https://forums.phpfreaks.com/topic/227692-re-autoload-class/#findComment-1174332 Share on other sites More sharing options...
lastkarrde Posted February 15, 2011 Share Posted February 15, 2011 I fail to see a use case where you would need to reload a class. Mayby think abit harder about what exactly your trying to achieve? Quote Link to comment https://forums.phpfreaks.com/topic/227692-re-autoload-class/#findComment-1174401 Share on other sites More sharing options...
Ninjakreborn Posted February 15, 2011 Share Posted February 15, 2011 Perhaps you have your languages mixed up. In PHP, you cannot "re-load" classes like you can in Java: http://www.developer.com/java/other/article.php/3606401/Dynamic-LoadingReloading-of-Classes-and-Dynamic-Method-Invocation-Part-1.htm Maybe you were mixing up your languages. Quote Link to comment https://forums.phpfreaks.com/topic/227692-re-autoload-class/#findComment-1174402 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.