Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我现在太困惑了……我的 index.html 包含一个简单的HTML form,我正在使用POST我将值发送到一个php文件,该文件最终执行一些数据库操作并返回一些消息……就这么简单。问题是我无法在 index.html 文件中打印此消息。有人帮忙。
HTML form
POST
php
将 index.html 设为 index.php 并将您的 php 代码移动到索引文件的顶部,然后将表单提交给自身。这允许您使用 echo 或类似方法进行实时用户反馈 - 无需 AJAX :)