Posts Tagged php
Upgrade to latest version of PHP in VirtualMin on CentOS
0
Get to a command prompt on your server with root access and run these commands:
- First, automatically configure yum to use these repositories on VirtualMin:
- rpm -ivh http://software.virtualmin.com/bleed/centos/5/i386/virtualmin-bleed-release-1.0-1.rhel.noarch.rpm
- yum update php
- Yes <– Prompt that you want to download and install
- php -v PHP
- Will show you your current version of PHP, mine was:
- 5.2.17 (cli) (built: Jan 16 2011 22:13:08) Copyright (c) 1997-2010 The PHP Group Zend Engine v2.2.0, Copyright (c) 1998-2010 Zend Technologies
- Restart Apache, I logged into the web gui for this because I can’t remember the /usr/sbin/blahblahblah command to restart Apache so do step 7 :p
- System Information > Status > Actions click “Restart Apache”, looks like double arrows
DONE!
php判断字符串中是否包含某个字符的方法
0
1 <?php 2 $string = www.rshining.com; 3 $some = "rshining"; 4 $num= explode($some, $string ); 5 if (count($num)>1): 6 echo "包含".$some; 7 else: 8 echo "不包含".$some; 9 endif; 10 ?>
最新评论