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...
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...
在运行时必须知道某个变量为何值。
然后在php.ini中设置:include_path = "c:/php",并将debug.php放在此文件夹,以后就可以在每个网页里包含此文件,查看得到的变量名和值.
匹配中文字符的正则表达式: [u4e00-u9fa5]
匹配双字节字符(包括汉字在内): [^x00-xff]
应用:计算字符串的长度(一个双字节字符长度计2,ASCII字符计1)
centos下php不会默认安装json扩展的。 而且也不能通过yum进行安装。
下载源文件包:wget http://www.aurore.net/projects/php-json/php-json-ext-1.2.1.tar.bz2解压tar xvjf php-json-ext-1.2.0.tar.bz2进入目录cd php-json-ext-1.2.0初始化PHP环境phpize报错了:phpize commend not foundPHP JSON安装之前需...
从网上看看了一些php下载文件的资料,改了改,写了这么个函数.
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...