使用apache和php或其他方法进行Boostraping
所以我得到了以下代码:使用apache和php或其他方法进行Boostraping,php,apache,bootstrapping,Php,Apache,Bootstrapping,所以我得到了以下代码: ini_set("include_path" , ini_get("include_path") . ":/Library/WebServer/Documents/__CMS/:"); ini_set('display_errors', 'ON'); $base_url = '127.0.0.1'; $lib_dir = '/Library/WebServer/Documents/__CMS/'; header('Location: admin/main.php?ba
ini_set("include_path" , ini_get("include_path") . ":/Library/WebServer/Documents/__CMS/:");
ini_set('display_errors', 'ON');
$base_url = '127.0.0.1';
$lib_dir = '/Library/WebServer/Documents/__CMS/';
header('Location: admin/main.php?base_url='.$base_url.'&lib_dir='.$lib_dir);
这很难看,但很简单,我正试图找到一种方法来处理多个位置的多个文件。我对引导有点熟悉,但不完全了解“最佳实践”
我的最终目标是一个解析ini文件并将变量、位置等分发给其他文件的文件…所有文件在加载之前都需要通过该文件。我正在研究通过.htaccess方法设置变量,但我不确定它是如何工作的
任何帮助都会很好!(我在这里寻找一些理论和最佳实践;)
谢谢 我以前做过的最好的方法是使用Apache的404处理程序和重写。 基本上,您告诉apache(在.htaccess中)将所有404发送到index.php(或您的引导程序),在该文件中,您可以根据键入的内容确定它们需要去哪里,并相应地加载内容 www.mysite.com/page.html>404!>index.php>加载page.html的数据 如果page.html的数据不存在,那么您只需抛出自定义404即可
非常容易设置和构建。您可以使用mod_rewrite将所有请求链接到index.php
RewriteEngine on
RewriteRule !\.(js|ico|gif|jpg|png|css)$ index.php
看看一些流行的框架。例如。我已经读了你的问题好几遍了,我真的不明白。你能澄清一下吗?