mysql - PHP Cannot redeclare function after file name changed -


i'm getting error

fatal error: cannot redeclare getallstaff() (previously declared in /applications/xampp/xamppfiles/htdocs/stafftools/database/staffhandler.php:5) in /applications/xampp/xamppfiles/htdocs/stafftools/database/staffhandler.php on line 15

i'm building application in apatana studio 3 , renamed file staffhandler.php staffhandler.php (uppercase s) former no longer exists.

i php files database directory using below php code

foreach(glob("database/*.php") $filename) {     include $filename; } 

and call method called getallstaff() here:

        <select name="staff">             <?php getallstaff(); ?>         </select> 

obviously, method in staffhandler.php. working fine until changed filename of name.

things i've tried

  1. clearing cache in firefox
  2. rebuilding & cleaning project in aptana
  3. changing filename staffhandler.php
  4. conditional function statemet if(!function_exists....

why on earth php throw error file doesn't exist anymore?

update: resolved

i had reference staffhandler.php file buried within php scripts , think source of problem. when ran ls -la @ terminal in database directory staffhandler.php appeared when ran find staffhandler.php , rm staffhandler.php erased both staff , staff. must've been kind of link between created application code.


Comments

Popular posts from this blog

java - Oracle EBS .ClassNotFoundException: oracle.apps.fnd.formsClient.FormsLauncher.class ERROR -

c# - how to use buttonedit in devexpress gridcontrol -

nvd3.js - angularjs-nvd3-directives setting color in legend as well as in chart elements -