tomcat 设置默认webapps、端口、首页

修改tomcat/conf目录的server.xml文件
在Engine段落里加入,即可将shev工程设置为默认webapps

<Context docBase="shev" path="" reloadable="true" />

修改server.xml文件
修改默认端口号

    <Connector connectionTimeout="20000" port="80" protocol="HTTP/1.1" redirectPort="8443"/>

修改web.xml文件,找到如下段落,加入自己需要的默认首页页面文件

    <welcome-file-list>
        <welcome-file>index.html</welcome-file>
        <welcome-file>index.htm</welcome-file>
        <welcome-file>index.jsp</welcome-file>
    </welcome-file-list>

PHP入门

代码块


echo "Hello World"; 

直接给变量赋值,即可声明变量


$x=2;

大小写不敏感

数组和逻辑变量变量


$numarray=array(1,2,3);//数组
$t=true;//逻辑

运算符:+ – * / % += ++形同C语言
字符串连接:.

$hw="Hello"."World";

类定义


class user={
public $id;
public $name;
}

$wg=new user;
$wg->id=1;
$wg->name='hello';

函数定义

function funca($p1){
  return $p1*2;
}
echo funca(3);

包含文件

include "inc.php";
require "req.php";//必须存在否则程序运行至此即停止

CentOS/RHEL5 安装PHP

解决yum 安装key无法验证问题

rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5 

关于Public key for *.rpm is not installed 的解决方法 – …

yum install openssl-devel        
yum install libxml2-devel       
yum install libxml2

RHEL 下的Oracle EM 乱码

原因:RHEL里缺少RH9时代的zysong.ttf,所以需要修改几个JRE的lib目录下的font.properties文件
或者把zysong.ttf copy到/usr/share/fonts/zh_CN/TrueType目录
删除$ORACLE_HOME/oc4j/j2ee/oc4j_applications/applications/em/em/cabo/images/cache/zhs的cache图片
然后重启emctl

$ emctl stop dbconsole
$ emctl start dbconsole

同样可以解决Sybase Central乱码问题

小站日志

2014-12-18 aliyun主机购买,woolgate.xyz域名购买
2014-12-30 wp安装完成,以woolgate.xyz为域名的码农驿站开张,发出第一篇文章
2015-1-19 woolgate.cn/woolgate.net 获得工信部备案许可,正式开张
2015-1-22 站点更名为码农小站
2022-4-24 新购入aliyun主机,重新申请备案
2022-5-18 MII备案通过,站点恢复