【发布时间】:2013-11-16 01:13:59
【问题描述】:
我在动作部分有一个带有变量的表单,里面有一个路径/文件名,但是 我在浏览器的 Url 字段 中总是出现 403 错误,而不是正确的路径。她是 sn-p。
<?php $Path = './index.php' ?>
<form action="<?php $Path ?>" method="post" id="form_login">
有什么想法可能是错的。 感谢您的宝贵时间。
【问题讨论】:
我在动作部分有一个带有变量的表单,里面有一个路径/文件名,但是 我在浏览器的 Url 字段 中总是出现 403 错误,而不是正确的路径。她是 sn-p。
<?php $Path = './index.php' ?>
<form action="<?php $Path ?>" method="post" id="form_login">
有什么想法可能是错的。 感谢您的宝贵时间。
【问题讨论】:
我见过 2 个错误。
<?php
$Path = './index.php'; // forgot to end the statement.
?>
/* forgot to echo and end the statement here */
<form action="<?php echo $Path; ?>" method="post" id="form_login">
【讨论】:
你需要回应它:
<form action="<?php echo $Path ?>" method="post" id="form_login">
【讨论】: