Javascript,php gets the code for the function parameter object

Source: Internet
Author: User
Tags config copy include php and php code
For example:
Copy Code code as follows:
function say () {
Alert (arguments[0]+ ' said: ' +arguments[1]);
}
Say (' Fanglor ', ' Fanglor is a boy! ');

Results: Pop-up Fanglor said: Fanglor is a boy!
--------------------------------------------------------------------------------
This is a bit like the Func_get_args () function in PHP and an array of function arguments.
Example (the following is the PHP code):
Copy 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! ";
}
}
}
}
}
Encapsulating include again
Uses (' config ', ' db ');

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

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.