在ASP中
<!--#include file="ConfIg.Asp"-->
<title><%=webname%></title>
其中Config.asp中内容为:
<%
Const webname="我的网站" '站点名称
%>
这样我就可以在Config.asp中设置网站名字,
但在PHP要怎么做呢? 总之我的目的就是以指定一个文件中设置网站的关键字。使所有文件都使用这个关键字
<!--#include file="ConfIg.Asp"-->
<title><%=webname%></title>
其中Config.asp中内容为:
<%
Const webname="我的网站" '站点名称
%>
这样我就可以在Config.asp中设置网站名字,
但在PHP要怎么做呢? 总之我的目的就是以指定一个文件中设置网站的关键字。使所有文件都使用这个关键字
<?php
define("WEBNAME","我的网站");
?>others.php
<?php
include("config.php");
?>
<html>
<title><?php echo WEBNAME;?></title>
...