当我这样做时:
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"}
这可能是什么错误?
答案 0 :(得分:2)