The PHP function does not find the called code, but the code is executed at runtime (PHP rookie)

Source: Internet
Author: User
Tags elastix
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();

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.