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