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
Ïà¹ØÎĵµ£º
sessionÎļþ±£´æÔÚ·þÎñÆ÷£¬¶Ôÿ¸ösession¶¼»áËæ»úÉú³ÉÒ»¸öΨһµÄsessionIdÀ´½øÐбêʶ£¬Ò»°ãÈç¹ûûÓÐÉèÖÃsessionµÄÉú´æÖÜÆÚ£¬Ôòsession»á±£´æÔÚÄÚ´æÖУ¬¹Ø±Õä¯ÀÀÆ÷£¬¸Ãsessionid»á×Ô¶¯×¢Ïú£¬ÖØÐÂÇëÇóʱÔò×Ô¶¯ÖØÐ·ÖÅä¡£
Èç¹û¿Í»§¶ËûÓнûÓÃcookie£¬ÔòÔÚʹÓÃsessionʱ£¬cookie»á°èÑÝ´æ´¢sessionIdºÍsessionÉú´æÖÜÆÚµÄ½ÇÉ«¡£¡ ......
PHP×÷ΪһÖÖ·þÎñÆ÷¶ËµÄ½Å±¾ÓïÑÔ£¬Ïó±àд¼òµ¥£¬»òÕßÊǸ´ÔӵĶ¯Ì¬ÍøÒ³ÕâÑùµÄÈÎÎñ£¬ËüÍêÈ«Äܹ»Ê¤ÈΡ£µ«ÊÂÇé²»×ÜÊÇÈç´Ë£¬ÓÐʱΪÁËʵÏÖij¸ö¹¦ÄÜ£¬±ØÐë½èÖúÓÚ²Ù×÷ϵͳµÄÍⲿ³ÌÐò£¨»òÕß³ÆÖ®ÎªÃüÁ£¬ÕâÑù¿ÉÒÔ×öµ½Ê°빦±¶¡£
¡¡¡¡ÄÇô£¬ÊÇ·ñ¿ÉÒÔÔÚPHP½Å±¾Öе÷ÓÃÍⲿÃüÁîÄØ£¿Èç¹ûÄÜ£¬ÈçºÎÈ¥×öÄØ£¿ÓÐЩʲô·½ÃæµÄ¹ËÂÇÄØ£¿Ïà ......
<?
require ("config.php3");
?>
<?
if($submit)
{
//echo $action;
//if($action=='update') &nb ......
ÔÚPHP.netµÄÅ£È˻ظ´ÖÐÕÒµ½Ò»¸ö×Ô¶¯¸ù¾ÝͼƬÎļþÀàÐÍ´ò¿ªÍ¼Æ¬µÄPHPº¯Êý,ºÜ·½±ã.
/**
*
* Loads a file based on its filetype and returns false if it fails.
*/
function imagecreatefromfile($path, $user_functions = false)
{
$info = @getimagesize($path);
if(!$info)
{ ......
Ð¶ÔØ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°æ±¾£¬ ......