The PHP function did not find the called code, but the runtime executed it (PHP rookie)

Source: Internet
Author: User
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 ();
  • Related Article

    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.