在代碼頭加入:
header('Access-Control-Allow-Origin:*');
header('Access-Control-Allow-Methods:OPTIONS, GET, POST'); // 允許option,get,post請求
header('Access-Control-Allow-Headers:x-requested-with'); // 允許x-requested-with請求頭
在代碼頭加入:
header('Access-Control-Allow-Origin:*');
header('Access-Control-Allow-Methods:OPTIONS, GET, POST'); // 允許option,get,post請求
header('Access-Control-Allow-Headers:x-requested-with'); // 允許x-requested-with請求頭
$fileContent = trim($fileContent); $fileContent=$queueList->characet($fileContent);