Why does function_exists always return faulse? As the question. The function is written in another php file and included with include before calling function_exists. However, false is returned and cannot be understood. & Nbsp; thank you all ------ solution ------------------ are php file names consistent? Is the function name consistent? Are the cases the same? ------ Why does function_exists always return faulse?
As the question. The function is written in another php file and included with include before calling function_exists.
However, false is returned and cannot be understood.
Thank you!
------ Solution --------------------
Are php file names consistent?
Is the function name consistent?
Are the cases the same?
------ Solution --------------------
You put that function on the page of your judgment.
As follows:
Function aa (){
Return 'BB ';
}
If (function_exists (aa ))
{
Echo 'yes ';
} Else {
Echo 'no ';
}
In this case, I tested yes. No problem,
In addition, you can call the function directly on your page to see if there will be any error. if there is no error, but it is not correct when you use function_exists, it may be your PHP version or environment. Generally, there will be no problems ..
------ Solution --------------------
Post a sample file
An error occurred while embedding the file.
------ Solution --------------------
Let's take a look at what I said on the first floor, or there is a problem with your inclusion. I use include and require for testing.