凡是与session有关的,之前必须调用函数session_start();为session付值很简单,如:
<?phpSession_start();$Name = "这是一个Session例子";Session_Register("Name");//注意,不要写成:Session_Register("[color=red]$Name[/color]");Echo $_SESSION["Name"];//之后$...
凡是与session有关的,之前必须调用函数session_start();为session付值很简单,如:
<?phpSession_start();$Name = "这是一个Session例子";Session_Register("Name");//注意,不要写成:Session_Register("[color=red]$Name[/color]");Echo $_SESSION["Name"];//之后$...
首先;下载软件;apache下载地址http://apache.mirror.phpchina.com/httpd/httpd-2.2.9.tar.gzphp下载地址:http://cn.php.net/distributions/php-5.2.6.tar.gzmysql下载地址:http://mysql.ntu.edu.tw/Downloads/MySQL-5.0/mysql-5.0.51a-linux-i686-glibc23.tar.gz
首先[root@localhost ]# wg...
function delhtml($content){ $content = eregi_replace("<html>.+</head>","", $content); $content = preg_replace("/<.+?>/i","", $content); return $content; } $oneurl = "http://www.chenapp.com"; $content = file_get_contents($oneurl); echo delhtml($content);
1. 安装apache php5apt-get install php5
vi /etc/apache2/mods-available/mime.conf
<IfModule mod_php5.c> AddType application/x-httpd-php .php AddType application/x-httpd-php .php3 AddType application/x-httpd-php-source .phps</IfModule>
vi /etc/apache2/sites-avail...
1. 开启防火墙端口:/sbin/iptables -I INPUT -p tcp --dport 80 -j ACCEPT/sbin/iptables -I INPUT -p tcp --dport 22822 -j ACCEPT/sbin/iptables -I INPUT -p tcp --dport 2121 -j ACCEPT/sbin/iptables -I INPUT -p tcp --dport 3306 -j ACCEPT/etc/rc.d/init.d/iptables save/etc/init.d/iptables restart查看...
yardvps CentOS5.7配置apache+php+mysql+vsftp笔记
1. 增加用户关闭root用户登陆
#useradd bevin
#passwd bevin
#vim /etc/ssh/sshd_config
把#PermitRootLogin 改成 PermitRootLogin no
#vim /etc/redhat-release
查看版本C...