in php there is a way to check whether a function exists or not in a page.
My question is..
Is there any way or predefined function to check whether a function is called or not in a page???
check whether a function is called??
Moderator: General Moderators
Re: check whether a function is called??
Is called or is defined? For the former no, for the latter yes.
Re: check whether a function is called??
is there any possibility of creating my own function to check whether is called or not?
something like
function is_function_called($function_name,$page_url,$called='true')
{
// lines of code
if($called)
return true ;
else
return false;
}
something like
function is_function_called($function_name,$page_url,$called='true')
{
// lines of code
if($called)
return true ;
else
return false;
}
Re: check whether a function is called??
What are you trying to do?
Re: check whether a function is called??
i have a php page A which include another page B if valid.
B is valid only if it calls a specific function.
B is valid only if it calls a specific function.
Re: check whether a function is called??
So you could read in B as a string, check for the presence of that function call using substrings or regex, then include or not accordingly, no? Still doesn't feel like a particularly good solution, mind you. The problem itself seems a little strange. Are you including pages dynamically?
Last edited by Celauran on Thu May 17, 2012 11:24 am, edited 1 time in total.
Re: check whether a function is called??
thanks for the quick reply.
i m not good in file handling.
so will you please guide me to some useful links??
plss
i m not good in file handling.
so will you please guide me to some useful links??
plss