Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

PHP

 PHPÕ¾µãµÄÔÚÏ߽̳ÌÒѾ­ºÜ°ôÁË¡£ÔÚÄÇÀﻹÓÐһЩÆäËû½Ì³ÌµÄÁ´½Ó¡£¶ø±¾Îĵĸò¿·Ö½«ÈÃÄã¶ÔPHPÊìϤһµã¡£ÎÒ²»¿ÉÄÜ×öµ½Ã»ÓÐÈκÎÒÅ©£¬ÎÒµÄÄ¿µÄÖ»ÔÚÓÚÄÜÈÃÄãѸËÙ¿ªÊ¼ÄãµÄPHP±à³Ì¡£
2.1 Ê×ÒªÌõ¼þ
ÄãÊ×ÏȱØÐëÒªÓÐÒ»¸öÕýÔÚ¹¤×÷×ŵÄÖ§³ÖPHPµÄweb·þÎñÆ÷¡£ÎÒ¼Ù¶¨ÔÚÄãµÄ·þÎñÆ÷ÉÏËùÓÐPHPÎļþµÄÀ©Õ¹ÃûΪ.php3¡£
2.2 PHPµÄ°²×°
Éú³ÉÒ»¸öÃûΪtest.php3µÄÎļþ£¬º¬ÓÐÒÔÏÂÄÚÈÝ£º
<? phpinfo(); ?>
È»ºóÔÚÄãµÄä¯ÀÀÆ÷Öдò¿ª´ËÎļþ¡£¿´¿´Õâ¸öÒ³ÃæÄã¾ÍÖªµÀÄãµÄPHP°²×°Ê¹ÓõÄÑ¡ÏîÁË¡£
2.3 Óï·¨
¾ÍÏñÇ°ÃæÌáµ½µÄÒ»Ñù£¬Äã¿ÉÒÔ»ìºÏ±àдÄãµÄPHP´úÂëºÍHTML´úÂë¡£Òò´ËÄã±ØÐëÓа취½«Á½ÕßÇø±ð¿ªÀ´¡£ÒÔϾÍÊÇÄã¿ÉÒÔ²ÉÓõļ¸ÖÖ·½·¨¡£Äã¿ÉÒÔÑ¡ÓÃÆäÖÐÒ»ÖÖÄã×îÊÊÓ¦µÄ²¢ÇÒ¾ÍÕâÑù¼á³ÖÕâÖÖ·½·¨£¡
´ÓHTMLÖзÖÀë
ÒÔÏÂÊÇ¿ÉÒÔʹÓõķ½·¨£º
<? . . . ?>
<?php . . . ?>
<script language="php"> . . . </script>
<% . . . %>
Óï¾ä
ÓëPerlºÍCÒ»Ñù£¬ÔÚPHPÖÐÓã¨;£©À´·Ö¸ôÓï¾ä¡£ÄÇЩ´ÓHTMLÖзÖÀë³öÀ´µÄ±êÖ¾Ò²±íʾÓï¾äµÄ½áÊø¡£
×¢ÊÍ
PHPÖ§³ÖC£¬C++ºÍUnix·ç¸ñµÄ×¢ÊÍ·½Ê½£º
/* C,C++·ç¸ñ¶àÐÐ×¢ÊÍ */
// C++·ç¸ñµ¥ÐÐ×¢ÊÍ
# Unix·ç¸ñµ¥ÐÐ×¢ÊÍ
Hello,World!
ͨ¹ýÎÒÃÇÒѾ­Ñ§¹ýµÄ֪ʶ£¬Äã¿ÉÒÔ±àдһ¸ö×î¼òµ¥µÄ³ÌÐòÊä³öÒ»¸öÒ²ÐíÊdzÌÐòÊÀ½çÖÐ×îÓÐÃûµÄ´ÊÓ
<HTML>
<HEAD>
<TITLE>
<?
echo "Hello World!";
?>
</TITLE>
</HEAD>
<BODY>
<H1>
First PHP page
</H1>
<HR>
<?
// Single line C++ style comment
/*
printing the message
*/
echo "Hello World!";
# Unix style single line comment
?>
</BODY>
</HTML>
2.4 Êý¾ÝÀàÐÍ
PHPÖ§³ÖÕûÊý¡¢¸¡µãÊý¡¢×Ö·û´®¡¢Êý×éºÍ¶ÔÏó¡£±äÁ¿ÀàÐÍͨ³£²»ÓɳÌÐòÔ±¾ö¶¨¶øÓÉPHPÔËÐйý³Ì¾ö¶¨£¨ÕæÊǺõĽâÍÑ£¡£©¡£µ«ÊÇÀàÐÍÒ²¿ÉÒÔ±»º¯Êýcast»òÕßsettype()Ã÷È·µÄÉ趨¡£
ÊýÖµ
ÊýÖµÀàÐÍ¿ÉÒÔÊÇÕûÊý»òÊǸ¡µãÊý¡£Äã¿ÉÒÔÓÃÒÔϵÄÓï¾äÀ´ÎªÒ»¸öÊýÖµ¸³Öµ£º
$a = 1234; # Ê®½øÖÆÊý
$a = -123; # ¸ºÊý
$a = 0123; # °Ë½øÖÆÊý (µÈÓÚÊ®½øÖÆÊýµÄ83)
$a = 0x12; # Ê®Áù½øÖÆÊý(µÈÓÚÊ®½øÖÆÊýµÄ18)
$a = 1.234; # ¸¡µãÊý"Ë«¾«¶ÈÊý"
$a = 1.2e3; # Ë«¾«¶ÈÊýµÄÖ¸ÊýÐÎʽ
×Ö·û´®
×Ö·û´®¿ÉÒÔÓɵ¥ÒýºÅ»òË«ÒýºÅÒý³öµÄ×ֶζ¨Òå¡£×¢ÒⲻͬµÄÊDZ»µ¥ÒýºÅÒý³öµÄ×Ö·û´®ÊÇÒÔ×ÖÃ涨ÒåµÄ£¬¶øË«ÒýºÅÒý³öµÄ×Ö·û´®¿ÉÒÔ±»À©Õ¹¡£·´


Ïà¹ØÎĵµ£º

7 ÖÖÁ÷ÐÐ PHP IDE µÄ±È½Ï

 ±àд¹ØÓÚ PHP µÄϵÁÐÎÄÕÂÈÃÎÒ¸ü¼ÓÉî¿ÌµØÁ˽âÁË PHP ¿ª·¢ÈËÔ±µÄÊÀ½ç¡£ÎÒºÍÐí¶à PHP ³ÌÐòÔ±½»Ì¸¹ý£¬×îÁîÎÒ¾ªÆæµÄÊÇÖ»ÓкÜÉÙµÄÈËʹÓà IDE¡£´ó¶àÊý³ÌÐòԱʹÓÃÎı¾±à¼­Æ÷£¬±ÈÈç Microsoft® Windows® ÉϵļÇʱ¾¡¢Emacs »òÕß Vim¡£
ÎÒÌáµ½µÄÕâЩÎı¾±à¼­Æ÷£¨ÒÔ¼°ÎÒûÌáµ½£©¶¼ÊǺܲ»´íµÄ —— ÎÒ²»ÏëÌÖÂÛ ......

PHPÂëÅ©½ø»¯Ê·3

Mysql×ÔÉíѧϰ
1.Êý¾Ý¿â³£ÓõÄ×Ö¶ÎÀàÐÍ£º
ÕûÊýÐÍ: TINYINT(0-255×Ö¶Î), SMALLINT(´óµã), INT(¸ü³¤), BIGINT;
СÊýÐÍ: FLOAT, BOUBLE, DECIMAL(M(ÕûÊý),D£¨Ð¡Êý£©);
×Ö·ûÐÍ: CHAR(¹Ì¶¨), VARCHAR(µ¯ÐÔ×Ö·ûÐÍ£¬¼õ»ºÈÝÁ¿);£¨××Ö·ûΪ255£©
ÈÕÆÚÐÍ: DATETIME£¨ÈÕÆÚʱ¼ä£©, DATE£¨ÈÕÆÚ£©, TIMESTAMP£¨ÈÕÆÚת»¯ÎªÊý×Ö.¾«¶È ......

PHP Apache ·þÎñ ¿ªÆô ÎÊÌâ

 ½ñÌìÔÚ¼ÒÀïÖØа²×°ÁËÒ»ÏÂPHP µ±ÈÃÒ²ÓÐApacheÁË¡£µ«ÊÇÎÒÓöµ½ÁËÒ»¸öÎÊÌ⣬¾ÍÊÇApache·þÎñÎÞ·¨¿ªÆô£¬ºó¹ûÔõÑùÎÒÏëºÜ¶àÈ˶¼ÊÇÖªµÀµÄ£¬µ±Ê±Ò²Ã»ÓжàÏ룬ÒÔΪÊÇ×Ô¼º°²×°µÄʱºò³öÏÖÁËʧÎó¾ÍÖØа²×°Ò»±é£¬¿ÉÊÇ»¹ÊÇÒ»ÑùÎÞ·¨´ò¿ª£¬È»ºóÎÒ¾ÍÔÚÏëÊÇʲôÎÊÌ⣬¶Ë¿ÚºÅ80.ÎҲ鿴ÁËһϣ¬·¢ÏÖûÓдíÎó°¡£¬Ë¼¿¼Á˺ܾ㬶ÔÍøÂçÒÔ¼°·À» ......

PHP С¼¼ÇÉ

=================================
mb_substr($str, 0, 1, "gbk");
Èç¹ûÌṩÁ˵ÚËĸö²ÎÊý£¬php»á½âÎöÕâ¸ö²ÎÊý
1. ½«Õâ¸ö²ÎÊýת»»³É×Ö·û´®.
2. µ÷ÓÃmbfl_name2no_encoding»ñµÃ±àÂëÆ÷ÐòºÅ
3. µÚ¶þ²½»áµ÷ÓÃmbfl_name2encoding£¬Õâ¸öº¯ÊýÔÚÑ­»·ÖÐʹÓÃÁËstrcasecmp
strcasecmpÊǺöÂÔ´óСдµÄ×Ö·û´®Æ¥Å䣬ÐÔÄܺܵͣ¬ ......

PHP·¾¶ÎÊÌâ

<?
php define('__TYPECHO_ROOT_DIR__', dirname(__FILE__));
define('__TYPECHO_PLUGIN_DIR__', '/usr/plugins');
@set_include_path(get_include_path() . PATH_SEPARATOR . __TYPECHO_ROOT_DIR__ . '/var' . PATH_SEPARATOR . __TYPECHO_ROOT_DIR__ . __TYPECHO_PLUGIN_DIR__);
ÄÜÏêϸµÄ½âÊÍÕâ¸öº¯ÊýÂ𣿵±È»Î ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ