The PHP function does not find the called code, but it is executed at runtime (PHP beginners seek help) to ask this strange question I encountered. I am studying the elastix source code, is a web access interface of the softswitch system, and then I want to find back based on its operation database to find out how to operate from the original user (which button is pressed ). The problem is that I cannot find the called code for the PHP function, but the code is executed at runtime (PHP beginners seek help)
I am studying the source code of elastix. it is a web access interface of the softswitch system,
Then I want to find out how to operate the database from the original user (which button is clicked ).
The problem is that I found the function that operates the database and only has this function. no other function is executing this DB operation,
However, no PHP calls this function.
This function is indeed executed (after I comment it out, click submit on the screen, and no data is inserted in the DB ).
This made me very depressed,
Can PHP class functions be called by other non-PHP functions?
Otherwise, how is it called?
It is just a common function.
Paste the function:
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, but I just got a little bit familiar with it. this problem is totally confusing to me.
------ Solution --------------------
You mean core_devices_addsip ???
Search for core_devices_addsip string in all files of the project
You can also write in this method
Print_r (debug_print_backtrace ());
Run the command to find out who is calling it.
------ Solution --------------------
Maybe you have found the wrong target.
The trail program runs from bottom to top.
That is, the interface is separated layer by layer. To do this, you need to write some simple pile pages.
PHP code
function f1() { f2();}function f2() { debug_print_backtrace();}f1();