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

¡¾PHPϵÁн̡̳¿(2)——PHPµÄ»ù±¾Óï·¨

ΪÁËÉîÈëÁ˽âPHP£¬ÒÔ¼°¸ü¼Ó±ãÀûµÄʹÓÃPHPΪÎÒÃÇ·þÎñ£¬±¾Õ½ÚÖ÷Òª½éÉÜPHPµÄ»ù±¾Óï·¨¡£
Ò»¡¢´ÓHTMLÖзÖÀë
PHP µÄ½Å±¾ÓÉÎļþÖÐÒ»¶ÔÌØÊâµÄ±ê¼ÇËùÒýÆðµÄÄÚÈÝ£¬µ±½âÊÍÆ÷·ÖÎöÒ»¸öÎļþʱ£¬ËùÓÐÌØÊâ±ê¼ÇÍâµÄÆÕͨÎļþ£¬½âÊÍÆ÷²»¶ÔÆä×öÈκδ¦Àí£¬¶øÌØÊâ±ê¼ÇÄÚÎļþ½«×÷Ϊ PHP ´úÂë±»½âÊÍÆ÷·ÖÎöÖ´ÐС£¸ÃÔËÐлúÖƽ«ÔÊÐíÄúÔÚ HTML ÖÐǶÈë PHP ´úÂ룺PHP ±ê¼ÇÍâµÄÄÚÈݽ«±»ÍêÈ«¶ÀÁ¢¿ª£¬²»×öÈκδ¦Àí£¬¶øÄÚ²¿µÄ½«×÷Ϊ PHP ´úÂë½âÎö¡£
ÓÃÀ´±ê¼Ç PHP ´úÂë¿éµÄ±ê¼Ç¹²ÓÐËÄÌ×£¬ÆäÖÐÖ»ÓÐÁ½Ì××ÜÊÇÓÐЧ£¨<?php. . .?> ºÍ <script language="php">. . .</script>£©£»ÁíÍâÁ½Ì׿ÉÒÔÔÚ php.ini ÅäÖÃÎļþÖпªÆô»òÕ߹رա£ËäÈ»¶Ì¸ñʽµÄ±ê¼ÇºÍ ASP ·ç¸ñµÄ±ê¼Ç¿ÉÄܱȽÏÊ¡Á¦£¬µ«ÊÇijЩÇé¿öÏÂÄú¿ÉÄܱØÐëҪʹÓó¤¸ñʽµÄ±ê¼Ç¡£±ÈÈ磬Äú´òËãÔÚ XML »òÕß XHTML ÖÐǶÈë PHP ´úÂ룬Äú½«ÐèҪʹÓà <?php. . .?> ÐÎʽµÄ±ê¼ÇÒÔÊÊÓ¦ XML µÄ±ê×¼¡£
PHP Ö§³ÖµÄ±ê¼ÇΪ£º
´úÂë1£º´ÓHTMLÖзÖÀëµÄ·½Ê½£º
1. <?php echo("if you want to serve XHTML or XML documents, do like this\n"); ?>
2. <? echo ("this is the simplest, an SGML processing instruction\n"); ?>
<?= expression ?> This is a shortcut for "<? echo expression ?>"
3. <mce:script language="php"><!--
echo ("some editors (like FrontPage) don't
like processing instructions");

// --></mce:script>
4. <% echo ("You may optionally use ASP-style tags"); %>
<%= $variable; # This is a shortcut for "<% echo . . ." %>
ÓÅÏÈÑ¡Óõķ½Ê½ÎªµÚÒ»ÖÖ·½Ê½ <?php. . .?>£¬ÒòΪËüÔÊÐíÄúÔÚ XML ½á¹¹£¬Èç XHTML µÄ´úÂëÖÐʹÓà PHP¡£
µÚ¶þÖÖ·½Ê½²¢·Ç×ÜÊÇ¿ÉÓõġ£Ö»Óе±ÄúÔÚ php.ini ÅäÖÃÎļþÖ줻î short_open_tag Ñ¡Ï²ÅÊÇ¿ÉÓõġ£ÄúÒ²¿ÉÒÔͨ¹ýʹÓà short_tags() º¯Êý£¨½öÓÃÓÚ PHP 3£©£¬»òÕßʹÓà --enable-short-tags Ñ¡Ïî configure PHP À´¼¤»î¶Ì¸ñʽ±ê¼Ç¡£ÔÚ php.ini-dist ÅäÖÃÎļþÖУ¬Ä¬ÈÏÊÇ¿ªÆô¶Ì¸ñʽ±ê¼ÇµÄ£¬µ«Êǽ¨ÒéÄú²»ÒªÊ¹Óøñê¼Ç¡£
ÔÚ PHP ÅäÖÃÎļþÖпªÆôÑ¡Ïî asp_tags ½«¼¤»îµÚËÄÖÖ·½Ê½¡£
×¢: ASP ·ç¸ñµÄ±ê¼ÇÌí¼ÓÓÚ PHP 3.0.4
×¢: µ±¿ª·¢´óÐÍÓ¦ÓóÌÐò»òÕßÓÃÓÚ·Ö·¢µÄº¯Êý¿â£¬»òÕßÔÚ²»ÊÜÄú¿ØÖÆµÄ PHP ·þÎñÆ÷ÉÏÃ濪·¢³ÌÐòʱ£¬Ç벻ҪʹÓö̸ñʽµÄ±ê¼Ç£¬ÒòΪĿ±ê·þÎ


Ïà¹ØÎĵµ£º

ÓÃapache_2.2ºÍphp 5.2´î½¨PHP»·¾³

ÊÊÓÃÓÚ×îеİ汾PHP-5.2.11ºÍAPACHE2.2
ÏÂÔصØÖ·
PHP£ºhttp://cn2.php.net/get/php-5.2.11-Win32.zip/from/a/mirror
PHPÖ±½ÓÏÂÔØhttp://cn.php.net/distributions/php-5.2.11-Win32.zip
APACHE http://labs.xiaonei.com/apache-mirror/httpd/httpd-2.2.14-win32-src.zip
1¡¢½«php½âѹµ½C:\phpĿ¼ÏÂ
2¡¢½«apache°²×° ......

PHP°²×°²½Ö裨ÒÔapache 2 + php5.3ΪÀý£©

1.     
Download Apache for windows MSI
file, and run it
By
default, port is 80, root dir is %apache_dir%/htdocs. You can update the
settings in conf/httpd.conf file
2.  If Apache Service can't be installed in "Control Panel > Admin Tools > Services&quo ......

phpÐòÁл¯

1£®Ç°ÑÔ
PHP £¨´Ó PHP 3.05
¿ªÊ¼£©Îª±£´æ¶ÔÏóÌṩÁËÒ»×éÐòÁл¯ºÍ·´ÐòÁл¯µÄº¯Êý£ºserialize¡¢unserialize¡£²»¹ýÔÚ PHP
ÊÖ²áÖжÔÕâÁ½¸öº¯ÊýµÄ˵Ã÷½öÏÞÓÚÈçºÎʹÓ㬶ø¶ÔÐòÁл¯½á¹ûµÄ¸ñʽȴû×öÈκÎ˵Ã÷¡£Òò´Ë£¬Õâ¶ÔÔÚÆäËûÓïÑÔÖÐʵÏÖ PHP
·½Ê½µÄÐòÁл¯À´Ëµ£¬¾Í±È½ÏÂé·³ÁË¡£ËäÈ»ÒÔÇ°Ò²ËѼ¯ÁËһЩÆäËûÓïÑÔʵÏÖµÄ PHP ÐòÁл¯µ ......

IISÏÂPHPµÄISAPIºÍFastCGI±È½Ï

    Ô­ÎÄÁ´½Ó£ºhttp://www.williamlong.info/archives/1846.html
    ÔÚWindows IIS
6.0ÏÂÅäÖÃPHP
£¬Í¨³£ÓÐCGI
¡¢ISAPI
ºÍFastCGI
ÈýÖÖÅäÖ÷½Ê½£¬ÕâÈýÖÖģʽ¶¼¿ÉÒÔÔÚIIS
6.0ϳɹ¦ÔËÐУ¬ÏÂÃæÎҾͽ²Ò»ÏÂÕâÈýÖÖ·½Ê½ÅäÖõÄÇø±ðºÍÐÔÄÜÉϵIJîÒì¡£
¡¡¡¡1¡¢CGI
£¨Í¨ÓÃÍø¹Ø½Ó¿Ú/Common Ga ......

php²Ù×÷word

<?

//
½¨Á¢Ò»¸öÖ¸ÏòÐÂCOM×é¼þµÄË÷Òý
$word

=

new
COM(”word
.
application”) or
die
(”Can
'
t start Word!”);
// ÏÔʾĿǰÕýÔÚʹÓõÄWordµÄ°æ±¾ºÅ
//echo “Loading Word, v. {$word->Version}<br>”;
// °ÑËüµÄ¿É¼ûÐÔÉèÖÃΪ0£¨¼Ù£©£¬Èç¹ûÒ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ