要向 100 多个 .htm 文件添加一项功能(以显示 eu cookie law 弹出窗口),这个提议的系统是否可以工作:
htaccess:将所有传入的 .htm 请求重定向到 cookie.php
在 cookie.php 里面:
$_SERVER['REQUEST_URI']
perform document search to get element in head, function{
include cookie display files
}
document search for element in footer, function{
Add <a href="#">Cookie Policy</a>
}
Send data to client browser
我有一些我不确定的事情。
- 将不会读取每个 URL:example.com/cookie.php
- 我不确定如何使用 request_uri 实际吐出数据
这可能吗?