我想重写import re
regex = r"(?:.*(?:\r?\n)+){2}age(?:.*(?:\r?\n|$)+){3}"
test_str = (" Pratap\n"
"pandey\n"
"age\n"
"25\n"
"student")
matches = re.finditer(regex, test_str, re.MULTILINE)
for match in matches:
matchNum = matchNum + 1
print (match.group())
文件中的URL。在.htaccess
的localhost中,以localhost/pdo/connect?id=3
的身份使用
localhost/pdo/connect/3
但是在connect.php中出现错误:
$ _ Get [“ id”]中未定义的索引ID
答案 0 :(得分:0)
尝试这个
RewriteCond "%{REQUEST_URI} "!connect.php"
RewriteRule ^connect/([^/]+).*" "connect.php?id=$1" [L,QSA,PT]
上述规则的工作如下。
www.sitename.com/connect/id