当我这样做时:
onClick = "return generateClient('<?php echo json_encode($_POST)?>');"
我在 google chrome 控制台上收到此错误。
Uncaught SyntaxError: Unexpected token ILLEGAL
但是当我从 php 执行此操作时:
print_r(json_encode($_POST));
我得到:
{"lang-select":"C++","question-id":"1","method-name":"Rishi","param-count":"1","lib-path":"c:\\h\\b.out","return-select":"unsigned int","sample-count":"1","class-name":"m"}
这可能是什么问题?