我正在用 PHP 制作一个网站,一切正常,但是当我更改 .htaccess 文件发布表单方法时没有发布数据。
.htaccess 文件(我在 stackoverflow.com 上找到了这个)
#Options +FollowSymLinks -MultiViews
# Turn mod_rewrite on
RewriteEngine On
RewriteBase /
## don't touch /forum URIs
RewriteRule ^forums/ - [L,NC]
## hide .php extension snippet
# To externally redirect /dir/foo.php to /dir/foo
RewriteCond %{THE_REQUEST} ^[A-Z]{3,}\s([^.]+)\.php [NC]
RewriteRule ^ %1 [R,L]
# To internally forward /dir/foo to /dir/foo.php
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME}.php -f
RewriteRule ^(.*?)/?$ $1.php [L]
形式
<form method="post" id="form" action="view_images.php">
<input type="text" name="img" value="images/1.jpg" id="img_name" />
<input type="submit" id="submit" value="submit" />
</form>
有什么想法有什么问题吗?