javascript,php Code _php tutorial for getting a function parameter object

Source: Internet
Author: User
For example:
Copy CodeThe code is 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 CodeThe code is 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.

http://www.bkjia.com/PHPjc/322977.html www.bkjia.com true http://www.bkjia.com/PHPjc/322977.html techarticle For example: the copy code code is as follows: function say () {alert (arguments[0]+ ' said: ' +arguments[1]);} Say (' Fanglor ', ' Fanglor ' a boy! '); Result: Popup Fanglor said: Fanglor is a boy ...

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