在vscode中的user snippets中设置的php只能在php片段中提示 如果php和html混合编写的话需要设置全局代码片段 12345"PHP": { "prefix": "php", "body": "<?php\n$0\n?>", "description": "php"}