存档在 2008年5月

apache实现多个端口

2008年5月10日

Listen 80
Listen 88

#===============================================================================
<VirtualHost 127.0.0.1:88>
DocumentRoot “D:EmpireServerphpapache2.2htdocs”
</VirtualHost>
<Directory “D:EmpireServerphpapache2.2htdocs”>
#
# Possible values for the Options directive are “None”, “All”,
# or any combination of:
#   Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews
#
# Note that “MultiViews” must be named *explicitly* — “Options All”
# doesn’t give it to you.
#
# The Options directive is both complicated and important.  Please see
# http://httpd.apache.org/docs/2.2/mod/core.html#options
# for more information.
#
Options FollowSymLinks

    #
# AllowOverride controls what directives may be placed in .htaccess files.
# It can be “All”, “None”, or any combination of the keywords:
#   Options FileInfo AuthConfig Limit
#
AllowOverride None

    #
# Controls who can get stuff from this server.
#
Order allow,deny
Allow from all

</Directory>

递归下降分析程序构造

2008年5月10日
#include <iostream>
using namespace std;
char A[100];    //用于存放符号串
int i=0;        //扫描指针
char sym;        //用于保存当前要判断的字符
bool flag=0;    //用于判断该输入是否匹配
void E();   // E
void EE();  // E’
void T();   // T
void TT();  // T’
void F();   // F
void advance();        //从字符串数组中读入一个字符
void main( )
{
cout
<<n多读入的结束字符为#nn;
cin
>>A;
cout
<<n***************************************nn;
sym
=A[0];
E();
if(sym!=#){
if(flag==1)
{
cout
<<n该输入串不匹配nn;
}
else
{
cout
<<n该输入串匹配nn;
}
}
}
void E()
{
T();
EE();
}
void EE()
{
if(sym==+)
{
advance();
T();
EE();
}

}
void T()
{
F();
TT();
}
void TT()
{
if(sym==*)
{
advance();
F();
TT();
}

}
void F()
{
if(sym==i)
advance();
else
{
if(sym==()
{
advance();
E();
if(sym==))
advance();
else
flag
=1;
}
else
flag
=1;
}

}
void advance()
{
i
++;
sym
=A[i];
if(sym==#)
{
if(flag==1)
{
cout
<<n该输入串不匹配nn;
}
else
{
cout
<<n该输入串匹配nn;
}
}

}