Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö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»µ¥ÒýºÅÒý³öµÄ×Ö·û´®ÊÇÒÔ×ÖÃ涨ÒåµÄ£¬¶øË«ÒýºÅÒý³öµÄ×Ö·û´®¿ÉÒÔ±»À©Õ¹¡£·´


Ïà¹ØÎĵµ£º

PHPÂëÅ©½ø»¯Ê·1_Zend

Zend-PHP±àÂë¹æ·¶
1.¶ÔÓÚÖ»°üº¬PHPµÄÎļþ£¬"?>"ÊDz»ÔÊÐí´æÔڵġ£×¢ÊÍ£º·Àֹĩβ±»ÒâÍâµÄ×¢Èë¿Õ°×²¢ÏÔʾÊä³ö¡£
2.Ëõ½øӦʹÓÃËĸö¿Õ¸ñµÄËõ½ø£¬¶ø²»Ê¹ÓÃÖƱí·ûTAB¡£
3.Ò»ÐÐ80¸ö×Ö·ûÊDZȽϺÏÊʵģ¬×î¶àΪ120×Ö·û¡£
4.ÐеĽáÊø·ûÖ»ÄÜÊDZê×¼µÄUNIXÎı¾ÎļþµÄ»»ÐУ¬»»ÐзûÔÚÎļþÖбíʾΪ10£¬»ò16½øÖÆµÄ 0x0A¡£
²»ÒªÊ¹ÓÃwin ......

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

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

PHP ²Ù×÷Access (ÕýÈ·)

 µÚÒ»ÖÖ·½·¨£º
<?php
class Access{
    function getConn(){
        $conn = @new COM("ADODB.Connection") or die ("ADOÁ¬½Óʧ°Ü!");
        $connstr = "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" . realpath(__IMP ......

PHP¶þάÊý×éÅÅÐò

 PHP±¾ÉíÊÇÓÐÒ»¸ö¶àάÊý×éÅÅÐòµÄº¯ÊýµÄ¡£
bool
array_multisort
( array
$ar1
[, mixed
$arg
[, mixed
$...
[, array
$...
]]] )
ÏÂÃæÊÇÊֲᵱÖжÔÓÚarray_multisortº¯ÊýµÄÃèÊö£º
array_multisort() ¿ÉÒÔÓÃÀ´Ò»´Î¶Ô¶à¸öÊý×é½øÐÐÅÅÐò£¬»òÕ߸ù¾Ýijһά»ò¶àά¶Ô¶àάÊý×é½øÐÐÅÅÐò¡£
¹ØÁª£¨string ......

PHPµÄÈÕÆÚʱ¼äº¯Êýdate()

 1£¬Äê-ÔÂ-ÈÕ
echo date('Y-m-j');
2007-02-6
echo date('y-n-j');
07-2-6
´óдY±íʾÄêËÄλÊý×Ö£¬¶øСдy±íʾÄêµÄÁ½Î»Êý×Ö£»
Сдm±íʾÔ·ݵÄÊý×Ö(´øÇ°µ¼)£¬¶øСдnÔò±íʾ²»´øÇ°µ¼µÄÔ·ÝÊý×Ö¡£
echo date('Y-M-j');
2007-Feb-6
echo date('Y-m-d');
2007-02-06
´óдM±íʾÔ·ݵÄ3¸öËõд×Ö·û£¬¶øСдmÔò±íÊ¾Ô ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ