易截截图软件、单文件、免安装、纯绿色、仅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
for
(
$i
=
0
;
$i
<
10
;
$i
++
)
{
    echo
$i
;
    sleep
(
1
)
;
}
?>
类似上面的程序如果在PHP解释器中执行,每秒会输出一个数,和想象中一样。但是如果使用浏览器来访问,情况就有所不同。在浏览器中访问时,只有在十秒之后才会一次性地显示所 ......

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时会覆盖 ......

Windows下安装最新的Apache+PHP+MySQL指南

 注意:之前我在网上找了好多的资料 NND都不能正常配置成功 搞得我是非常地郁闷!
找到这篇文章之后我终于配置成功了!哇好爽呀!只要按照 上面的步骤就一定能够成功的!
此文章的安装方法适用于Windows XP下的Apache+PHP+MySQL安装,同时也适用于Windows 2003系统下的安装和配置。
1. 安装环境
操作系统是 Window ......

超级简单的php+mysql留言本源码

 共3个文件
IncDB.php数据库连接
index.php首页
InsetToDB.php数据库操作
数据库lguestbook里面建表
CREATE TABLE `intd` (
`id` int(11) NOT NULL auto_increment,
`name` varchar(255) character set utf8 collate utf8_bin N ......

在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   ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号