Home  >  Article  >  Backend Development  >  如何在HTML中获取PHP中某个变量的值

如何在HTML中获取PHP中某个变量的值

WBOY
WBOYOriginal
2016-06-13 11:54:423035browse

怎么在HTML中获取PHP中某个变量的值
我现在有2个文件,一个sms.php  一个是index.html,我在php文件中,生成了一个变量$a我现在想在html中获取到$a的值,并且进行JS判断
------解决方案--------------------
ajax取值
------解决方案--------------------
把两个文件合并成一个不行吗,在sms.php 最底下引用include('./index.html');
然后在index.html相应的部分直接就行吧

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn