Quick Table of Contents
[Edit] Fatal Error: Call to undefined function
This error will render when you call a function to run that does not exist to the script, or you are not using the proper case when calling the function.
When working with classes in PHP it often renders when you forget to place $this-> when refering to on object.
How can i fix itBe sure to only call functions by name that exist, and be sure to use the proper casing. One can use the function_exists('sayHi') php function in a condition statement before attempting to run any function. That function was made to see if functions exist in the script.<?php function sayHi(){ echo "hi"; } if (function_exists("sayHi")) { sayHi(); } ?>Or just make sure you call the correct function name <?php function sayHi(){ echo "hi"; } sayhi();// Wrong sayHi();// Right ?>
October 18, 2011
|
This Page is Under Construction! - If You Want To Help Please Send your CV - Advanced Web Core (BETA)
© Advanced Web Core. All rights reserved