易截截图软件、单文件、免安装、纯绿色、仅160KB

PHP函数:ctype_digit

 (PHP 4 >= 4.0.4)
功能说明:Check for numeric character(s)
Description
bool ctype_digit ( string text)
Returns TRUE if every character in text is a decimal digit, FALSE otherwise.
例子 1. A ctype_digit() example
<?php $strings = array('1820.20', '10002', 'wsl!12'); foreach ($strings as $testcase) {
if (ctype_digit($testcase)) {
echo "The string $testcase consists of all digits.\n";
} else {
echo "The string $testcase does not consist of all digits.\n";
}
} ?>
This example will output :
The string 1820.20 does not consists of all digits. The string 10002 consists of all digits. The string wsl!12 does not consists of all digits.
PHP函数:ctype_xdigit
(PHP 4 >= 4.0.4)
功能说明:Check for character(s) representing a hexadecimal digit
Description
bool ctype_xdigit ( string text)
Returns TRUE if every character in text is a hexadecimal 'digit', that is a decimal digit or a character from [A-Fa-f] , FALSE otherwise.
例子 1. A ctype_xdigit() example
<?php $strings = array('AB10BC99', 'AR1012', 'ab12bc99'); foreach ($strings as $testcase) {
if (ctype_xdigit($testcase)) {
echo "The string $testcase consists of all hexadecimal digits.\n";
} else {
echo "The string $testcase does not consist of all hexadecimal digits.\n";
}
} ?>
This example will output :
The string AB10BC99 consists of all hexadecimal digits. The string AR1012 does not consist of all hexadecimal digits. The string ab12bc99 consists of all hexadecimal digits.
ctype_alnum
(PHP 4 >= 4.0.4, PHP 5)
ctype_alnum -- Check for alphanumeric character(s)
说明
bool ctype_alnum ( string text )
Checks if all of the characters in the provided string, text, are alphanumeric. In the standard C locale letters are just [A-Za-z] and the function is equivalent to preg_match('/^[a-z0-9]*$/i', $text).
参数
text
The tested string.
返回值
Returns TRUE if


相关文档:

在PHP中执行系统外部命令

 
PHP作为一种服务器端的脚本语言,象编写简单,或者是复杂的动态网页这样的任务,它完全能够胜任。但事情不总是如此,有时为了实现某个功能,必须借助于操作系统的外部程序(或者称之为命令),这样可以做到事半功倍。
  那么,是否可以在PHP脚本中调用外部命令呢?如果能,如何去做呢?有些什么方面的顾虑呢?相 ......

PHP全能班【2009年11月14日开课】

 PHPChina【郑州】认证中心- -PHP全能班(2009年11月14日开课)
改变职业人生,成就新的事业,PHP--全球最热门网站开发技术!
        国内排名前十名的网站中使用PHP的有8家:百度、腾讯网、新浪、搜狐、网易、淘宝、雅虎中国、Tom在线。国内近两年新推出的web2.0网站中,有80%使用 ......

PHP解疑(2)

PHP解疑(2)
1.        magic_quotes_xxx的作用
magic_quotes_gpc为on时,php在注册变量时会调用addslashes()函数处理[既转义单引号、双引号、反斜线和nullbyte],但php.ini中还有另外一个选项影响着magic_quotes_gpc和addslashes()函数:当php.ini设置magic_quotes_sybase为on时会覆盖 ......

在centos5.3下安装GCC所必须的5个依赖包php json安装

在centos5.3下安装GCC所必须的5个依赖包
最小化安装centos5.3,默认没有安装gcc,利用下载的安装DVD,通过filezilla上传,发现GCC所必须的5个依赖包为:
kernel-headers-2.6.18-128.el5.i386.rpm   
cpp-4.1.2-44.el5.i386.rpm     
libgomp-4.3.2-7.el5.i386.rpm   ......

Mysql、Apache、Php的卸载 (Linux)

 卸载Mysql
[root@localhost ~]# rpm -qa | grep mysql
mysql-3.23.58-9
php-mysql-4.3.4-11
mod_auth_mysql-20030510-4.1
mysql-server-3.23.58-9
说明:rpm –qa | grep mysql 命令是为了把mysql相关的包都列出来,卸载都从最下面的一个包开始,直到卸载掉第一个为止。执行rpm -q php,如果返回php版本, ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号