PHP»·¾³ÅäÖÃÐĵÃ
PHP»·¾³ÅäÖÃÐĵÃ
ApacheµÄÅäÖÃ
Ê×ÏÈÎÒÔÚhttp://httpd.apache.org/download.cgiϵÄÊÇ“Win32 Binary without crypto (no mod_ssl) (MSI Installer): httpd-2.2.15-win32-x86-no_ssl.msi”¡£°²×°ÄÇÊÇС¶ù¿ÆÀ²£¬ÏÂÒ»²½ÏÂÒ»²½¡£ÎҾͲ»ËµÁË¡£
°²×°Íêºó¾ÍÒª¿ªÊ¼ÅäÖÃÁË£¬Ê×ÏÈÊÇÅäÖ÷ÃÎÊÎļþµÄ·¾¶£¬Ä¬ÈϵÄÊÇ“C:\Program Files\Apache Software Foundation\Apache2.2\htdocs”ÒòΪÎÒµÄÎļþ·ÅÔÚFÅÌ£¬ËùÒÔÎÒÕÒµ½ÁË“C:\Program Files\Apache Software Foundation\Apache2.2\conf”ϵēhttpd”ÎļþÕÒµ½ÁËDocumentRoot£¬±¾À´ÎÒ¾ÍÊÇ´Ó×ÊÔ´¹ÜÀíÆ÷µÄ¸´ÖÆÍøվ·¾¶“F:\djl\http”£¬×¢Òâ°¡£¬ApacheµÄĿ¼¸ñʽÊÇ“/”б¸Ü£¬ËùÒÔÒª¸Ä³É“F:/djl/http”¡£
´Ëʱ°Ñä¯ÀÀÆ÷´ò¿ªÊäÈë“http://localhost/”È´·¢ÏÖ֮ǰĬÈ쵀 “It works!”²»¼ûÁË£¬È¡¶ø´úÖ®µÄÊÇ
Forbidden
You don't have permission to access / on this server.
--------------------------------------------------------------------------------
Apache/2.0.55 (Win32) PHP/5.1.2 Server at localhost Port 8080
ÎÒ¿ªÊ¼Ê±ÏëÏëÕâ¿ÉÄÜÊDzÙ×÷ϵͳ¶ÔFÅ̽øÐÐÁËÎļþȨÏÞµÄÉèÖ㬰ÑFÅÌÉèÖóɹ²ÏíҲû½â¾öÎÊÌâ¡£ÕýËùν“ÄÚÊÂÎÊ°Ù¶È ÍâÊÂÎʹȸ蔣¬ÔÚ“http://zhidao.baidu.com/question/2955182.html”ÕÒµ½ÁËÔÒò~~~ÔÀ´ÊÇаæµÄApacheºóÃ滹ÓÐÒ»¶ÎÕâ¸ö¹í¶«Î÷
# This should be changed to whatever you set DocumentRoot to.
¿ÉÄÜÊÇÒòΪаæµÄÔÒò°É£¬ºÍÊéÉϵĶ«Î÷²»Í¬£¬Òª¸ÄÍøվĿ¼µÄ»°£¬»¹Òª°ÑºóÃæÕâ¾ä¸Ä³É
<Directory "F:/djl/http">
¾Í¿ÉÒÔ¡£
ÖÁ´ËApacheÅäÖÃÍê³É£¬»¹ÓÐÁ½¸öϸ½ÚÎÊÌ⣬һÊǸÄÁËÅäÖÃÎļþÒª¼ÇµÃ±£´æ£¬²¢ÖØÆôApache¡£
PHPµÄÅäÖÃ
Ê×ÏÈÔÚhttp://cn2.php.net/get/php-5.2.13-Win32.zip/from/a/mirrorÕÒµ½ÁËÏÂÔØ¡£Õâ¸ö¿´Êé°¡ÕæµÄÊÇÒª×Ðϸ°¡£¬ÊéÉÏÊÇÕâôдµÄ
ÕÒµ½“extension_dir="./"”£¬½«ËüÐ޸ijɓextension_dir=F:\php\ext”
½á¹ûÎÒ°ÑÍâÃæÄǸöÒýºÅ“”Ò²¿´½øÈ¥ÁË£¬ÔÀ´µÄextensio
Ïà¹ØÎĵµ£º
×î½üµÄphp°æ±¾ºÃÏñÒѾµ½ÁË5.3°É£¬Óв»ÉÙ¶«Î÷¶¼³öÏÖÁ˱仯£¬´Ó5.3¿ªÊ¼£¬ÎªÁ˸üºÃµÄÏòδÀ´°æ±¾µÄphp£¨°æ±¾6£©¹ý¶É£¬½«Î´À´²»ÔÙÖ§³ÖµÄº¯Êý±ê¼Ç³ÉÁËdeprecated¡£ÔÚ´úÂëÖÐʹÓÃÕâЩº¯Êý£¬½«ÔÚÒ³ÃæÖÐÏÔʾ¾¯¸æÐÅÏ¢¡£
±ä¸ü£º
ÅäÖÃÎļþǨÒÆ
PHP 5.3 ¿ªÊ¼£¬ÅäÖÃÎļþ php.ini ÖеÄһЩÅäÖý«»áÔÚ PHP Ö´ÐÐʱÏÔʾ¹ýʱ¾¯¸æ£¬ÕâЩÅäÖý ......
»ù±¾Óï·¨
ÎҵĵÚÒ»¸öPHP£ºHello World
<?php
echo"Hello World!";
?>
ÏÔʾ½á¹ûΪ Hello World!
±äÁ¿
PHPÖУ¬ËùÓеıäÁ¿¶¼ÒÔ±êʶ“$”¿ªÍ·:
<?php
$str1 = "Hello World!";
echo $str1;
?>
ÏÔʾ½á¹ûΪ Hello World!
PHPÖÐʹÓÓ.”·ûºÅÁ¬½Ó²»Í¬µÄ×Ö·û´®¡£¾ÙÀýÈçÏ£º
<?p ......
ÈçºÎÓÃphpÖ±½Óµ÷ÓÃÎı¾ÎļþÄÚÈÝ:Ê×ÏÈͨ¹ýfileº¯Êý´ò¿ª·þÎñÆ÷ÉϵÄÒ»¸öÎı¾Îļþ£¬·µ»ØµÄ$myFile ¾Í½«³ÉΪÕâ¸öÎļþ²Ù×÷µÄ¾ä±ú£¬È»ºóÔÙͨ¹ýÑ»·Ö¸Áȡ³öÎļþÖÐÿһÐеÄÄÚÈݲ¢´òÓ¡³öÀ´¡£
±à³Ì˼·
Ê×ÏÈҪʹÓõĺ¯ÊýΪfi1e£¬±¾º¯ÊýÓë readfile() ÀàËÆ£¬²»Í¬µÄµØ·½Îª file º¯Êý½«ÎļþÖеÄÄÚÈÝÈ«²¿¶Á³ö ......
ÉÏһƪÖУ¬¼òµ¥Ð´Á˸öInput.php £¬ µ«ÉúÈÕÄÇÒ»À¸Òª×Ô¼ºÊÖ¶¯ÊäÈëд£¬±È½ÏÂé·³£¬ËùÒÔÕâÀïÓõ½Ò»¸öJSÎļþ£¬¿ÉÒÔÑ¡ÔñÈÕÆÚ
µã»÷ÏÂÔØÕâ¸öjsÎļþ
ÔÚInput.phpÎļþ×¶ËÒýÓÃÕâ¸öJSÎļþ
<script type="text/javascript" src="calenderJS.js"></script>
½«ÉúÈÕµÄÊäÈë¿ò¸Ä³É
<input name="birthday" type="text" ......
PHP»º´æ¼¼ÊõÏê½â
Ò»¡¢»º´æ¼¼Êõ:
ÓÐЩÐÅÏ¢±È·½¾³£²»±äµÄ,µ«ÊÇ»¹ÊÇÄܱäµÄÐÅÏ¢·ÅÔÚ»º´æÖÐÒÔ¼Ó¿ìÏÔʾËÙ¶È,ÕâÊǺÜÓмÛÖµµÄ,ËùνµÄ»º´æ,ͨË×µÄÀí½â¾ÍÊÇһЩ±£´æÔÚ·þÎñÆ÷¶ËµÄ¹²ÓÃЊϢ.ËüÊÇÓÚ·þÎñÆ÷ͬÉúËÀµÄ,ÎÒÃÇÔÚ±£´æ»º´æµÄʱºò¿ÉÒÔÖ¸¶¨Ï´θüеÄʱ¼äµÄÅжÏ,±È·½ÒªÔÚ5·ÖÖÓ¸üÐÂÒ»´Î,¿ÉÒԼǼÉϴθüеÄʱ¼ ......