The PHP function did not find the called code, but the runtime executed it (PHP beginner for help)
Ask me this strange question, I am studying Elastix source code, is a soft-switching system Web Access interface,
Then I want to look back based on its operational database and find out how to operate from the initial user (which button is pressed).
The problem is, I found the function that operates the database, and only this one function, there is no other function to perform this DB operation,
However, none of the PHP calls this function.
And this function is actually executed (after I comment it out, click submit from the screen, no data is inserted in the DB).
It makes me extremely depressed,
is PHP a class function that can be called by other non-PHP things?
How else would it be called?
It's just a normal function.
Paste the function to:
Class Core_conf {
function Core_devices_addsip ($account) {
Global $db;
Global $currentFile;
......
$compiled = $db->prepare (' INSERT into SIP (ID, keyword, data, flags) values (?,?,?,?) ');
$result = $db->executemultiple ($compiled, $sipfields);
if (Db::iserror ($result)) {
Die_freepbx ($result->getdebuginfo (). "
".' Error adding to SIP table ');
}
}
}
I just got in touch with PHP just to get a little bit of fur, and that's totally confusing me.
------Solution--------------------
You mean Core_devices_addsip???
Search for Core_devices_addsip strings in all files in the project
You can also write in this method
Print_r (Debug_print_backtrace ());
Run it and you can see who's calling it.
------Solution--------------------
Maybe you're looking at the wrong target.
The tracker runs from the bottom up
That is, from the interface, a layer of peeling off. For this you need to write some simple piles of pages
PHP Code
Function F1 () { F2 ();} function F2 () { debug_print_backtrace ();} F1 ();