Php+javascript javascript,php Gets the code for the function parameter object

Source: Internet
Author: User
For example:

Copy the Code code as follows:


function say () {
Alert (arguments[0]+ ' said: ' +arguments[1]);
}
Say (' Fanglor ', ' Fanglor are a boy! ');


Result: Pop Fanglor said: Fanglor is a boy!
--------------------------------------------------------------------------------
This is a bit like the Func_get_args () function in PHP, which is also an array to get the function arguments.
Example (the following is the PHP code):

Copy the Code code as follows:


function uses () {
$args =func_get_args ();
if (!empty ($args)) {
foreach ($args as $key = = $val) {
if (file_exists ($val. '. php ')) {
Include "{$val}.php";
} else {
if (DEBUG) {
echo "{$val}.php does not exist! ";
}
}
}
}
}
Package include again
Uses (' config ', ' db ');


Automatic loading of config.php and db.php, if not present, shows {__file__}.php does not exist.

The above describes the Php+javascript javascript,php get function Parameter object code, including the php+javascript aspect of the content, I hope that the PHP tutorial interested in a friend helpful.

  • 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.