PHP文件无法从index.html获取$\u POST数据
我正在为我的网站制作一个简单的电子邮件联系表 以下是文件的结构:PHP文件无法从index.html获取$\u POST数据,php,html,post,Php,Html,Post,我正在为我的网站制作一个简单的电子邮件联系表 以下是文件的结构: ---- My_Website | |__ index.html | |__ assets | |__ email.php 在index.html中,我有一个带有“POST”的表单: 电子邮件 主题 消息 发送 在我的php文件中,我只是做了一个var\u转储($\u POST)我很确定我在
---- My_Website
|
|__ index.html
|
|__ assets
|
|__ email.php
在index.html中,我有一个带有“POST”的表单:
电子邮件
主题
消息
发送
在我的php文件中,我只是做了一个
var\u转储($\u POST)代码>我很确定我在输入表单中写了一些东西,但它会返回数组(0){}将action=“/assets/email.php”
更改为action=“assets/email.php”
显示php代码。将action=“/assets/email.php”
更改为action=“assets/email.php”
var\u dump($\u POST)是php文件中的所有内容,它仍然提供给我:array(0){}
<form role="form" action="assets/email.php" method="POST">
<div class="form-group">
<label class="sr-only" for="contact-email">Email</label>
<input type="text" name="email" placeholder="Email..." class="contact-email form-control" id="contact-email">
</div>
<div class="form-group">
<label class="sr-only" for="contact-subject">Subject</label>
<input type="text" name="subject" placeholder="Subject..." class="contact-subject form-control" id="contact-subject">
</div>
<div class="form-group">
<label class="sr-only" for="contact-message">Message</label>
<textarea name="message" placeholder="Message..." class="contact-message form-control" id="contact-message"></textarea>
</div>
<button type="submit" class="btn btn-success">Send</button>
</form>