客戶端:var source = new EventSource("http://controller.shujudaping.com:8084?token=1");服務(wù)器端:<?phpheader("Access-Control-Allow-Origin: *");header('Content-Type: text/event-stream');header('Cache-Control: no-cache');$token = $_GET['token'];echo "token: The token is: {$token}\n\n";flush();?>怎么才能在服務(wù)器端拿到token的數(shù)據(jù)?
js EventSource
阿晨1998
2018-10-12 10:13:31