
在PHP中
<?php// create a list of approved function calls$approved_functions = array('sendForm','fn2');// check the $_GET['function'] and see if it matches an approved functionif(in_array($_GET['function'], $approved_functions)){ // call the approved function $_GET['function']();}function sendForm(){ //save form}function fn2(){ //do something}在AJAX中
// specify which function to callurl: "myfunctions.php?function=sendForm",
欢迎分享,转载请注明来源:内存溢出
微信扫一扫
支付宝扫一扫
评论列表(0条)