小编Col*_*ole的帖子

.htaccess区分大小写和mod_rewrite

我的.htaccess:

RewriteEngine On
CheckCaseOnly On
CheckSpelling On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-l
RewriteRule ^Blog/(.*?)$ /Me/profile.php?username=$1 [QSA,L]
Run Code Online (Sandbox Code Playgroud)

问题是,当URL是这样的时,它的工作原理是:

localhost/Me/Blog/ExampleUser
Run Code Online (Sandbox Code Playgroud)

但是当它像这样时它不起作用(请注意'Blog'中的'b'是小写的?):

localhost/Me/blog/ExampleUser
Run Code Online (Sandbox Code Playgroud)

我正在新版XAMPP上运行它.即使我在PHP配置上有mod_speling.so,它仍然无法工作.

问题是什么?

.htaccess

7
推荐指数
1
解决办法
2万
查看次数

无线电未使用 serializeArray 进行序列化

索引.php:

<form id = "regform" action = "registration.php" method = "POST">
    <label id = "namelabel">Username: </label> <input type = "text" name = "username" class = "username" maxlength = "40" placeholder = "Enter a Username"><br>
    <label id = "namelabel">Password: </label> <input type = "password" class = "password" name = "password" placeholder = "Enter Password"><br>
    <label id = "namelabel">Gender: </label>
    <input type="radio" name="gender" value = "Male"> Male
    <input type="radio" name="gender" value = "Female"> Female
    <label id = "namelabel">Email: </label> <input type = …
Run Code Online (Sandbox Code Playgroud)

html php jquery serialization

5
推荐指数
1
解决办法
5719
查看次数

允许HTML中最多连续2次换行

例如:

StackOverflow<br>
<br>
<br>
<br>
<br>
is
<br>
<br>
<br>
<br>
a
<br>
community.
Run Code Online (Sandbox Code Playgroud)

至:

StackOverflow
<br>
<br>
is
<br>
<br>
a
<br>
community.
Run Code Online (Sandbox Code Playgroud)

如果<br>字符串中有多于2 个,则应删除所有字符串<br>并仅保留两个字符串.代码到目前为止:

$txt_unclean = trim(nl2br($_POST['txt_content']));
$txt_content = strip_tags($txt_unclean, '<br>');
Run Code Online (Sandbox Code Playgroud)

你下一步怎么做?我如何允许不超过2 <br>.

php regex

0
推荐指数
1
解决办法
380
查看次数

标签 统计

php ×2

.htaccess ×1

html ×1

jquery ×1

regex ×1

serialization ×1