我在www/public之外的文件夹中定义了我的登录详细信息和连接文件。而且工作正常。但是,我有一个表单,当用户单击submit时,由于安全原因(它在www文件夹之外),我将再次请求由该文件夹中的文件处理。但是,它告诉我禁止访问,好像有一个htaccess文件(但没有)。
<form action="/C:/xampp/login_mysql/process_login.php" method="post"
name="login_form">
User: <input type="text" name="username" id="username"/>
Password: <input type="password"
name="password"
id="password"/>
<input type="submit"
value="Login" />
</form>发布于 2014-08-14 12:23:55
浏览器得到的是action属性。你需要
process_login.php移动到站点根目录下的位置,或include process_login.php。第二个例子:
<form action="/somewhere/under/the/www/root/process_login.php"...
和somewhere/under/the/www/root/process_login.php
<?php include 'C:/xampp/login_mysql/process_login.php'; ?>https://stackoverflow.com/questions/25307955
复制相似问题