我在abc.php中编写PHP函数,就像这样,
function testFunction($par1, $par2){
echo $par1." ".$par2;
}
现在我试图通过网络服务访问上述功能,如何做到这一点,我尝试使用" CURL"但似乎并不成功。请帮帮我,
$ch = curl_init();
$curlConfig = array(
CURLOPT_URL => "abc.php",
CURLOPT_POST => false,
CURLOPT_RETURNTRANSFER => true,
);
curl_setopt_array($ch, $curlConfig);
$result = curl_exec($ch);
curl_close($ch);