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

php»·¾³´î½¨


µÚÒ»²½£ºÏÂÔØ°²×°³ÌÐò
£¨1£© Apache2.2.4°æÏÂÔØ£¬µØÖ·£ºhttp://httpd.apache.org/download£¬Ñ¡Ôñ
apache_2.2.4-win32-x86-no_ssl.msi£¬´óÔ¼4M¶à¡£
£¨2£©PHP5.2.3°æÏÂÔØ£¬ µØÖ·£ºhttp://www.php.net/downloads.php£¬Ñ¡ÔñWindows BinariesÏÂÃæµÄPHP5.2.3.zip package£¬Ëü¶ÔÓ¦php-5.2.3-Win32.zipÎļþ£¬´óÔ¼9M¶à¡£
µÚ¶þ²½£º°²×°³ÌÐò
£¨1£© Apache°²×°
Ë«»÷°²×°³ÌÐò£¬³ýÁËÖмäÓÐÒ»²½ÐèҪѡÔñÍâÆäÓ඼²ÉÓÃĬÈÏ°²×°¡£ÀýÍâµÄÄÇÒ»²½ÓÐÁ½¸öÑ¡ÏһÊÇ”for All users, on port80…”£¬ÁíÒ»¸öÊÇ”only for current user, on port 8080…”£¬ÎªÁ˲âÊԺͿª·¢·½±ã£¬½¨ÒéÑ¡ÔñºóÒ»ÖÖ£¬²ÉÓÃ8080¶Ë¿Ú£¬ÕâÑù²âÊÔ·½±ãһЩ¡£
£¨2£© PHP°²×°
Ñ¡Ôñ½«php-5.2.3-Win32.zip½âѹµ½php-5.2.3-Win32ÎļþÏ£¬½âѹºóphp-5.2.3-Win32Ŀ¼Ï°üº¬ÓÐÈçphp.exeºÍphp5apache2_2.dllÖ®ÀàµÄÎļþ¡£È»ºó½«php-5.2.3-Win32ÎļþÃû¸ÄΪphp£¬È»ºó¿½±´ÖÁCÅ̸ùĿ¼Ï¡£
µÚÈý²½£º»·¾³ÅäÖÃ
£¨1£© Ìí¼ÓPHP»·¾³±äÁ¿£º½«” C:\php”Ìí¼Óµ½ÏµÍ³±äÁ¿Path£¬×¢ÒâÓëÒÑÓеÄÖµ²ÉÓ÷ֺŷָô¡£Pathϵͳ±äÁ¿¿ÉÒÔͨ¹ýÓÒ»÷ÎҵĵçÄÔ->ÊôÐÔ->¸ß¼¶->»·¾³±äÁ¿->ϵͳ±äÁ¿->PathÕÒµ½¡£
£¨2£© ÐÞ¸ÄApacheÅäÖÃÎļþ£ºÔڸղŰ²×°³É¹¦µÄApacheĿ¼C:\Program Files\Apache Software Foundation\Apache2.2\confÏÂÕÒµ½httpd.conf£¬ÔÚºóÃæÌí¼ÓÈçÏÂÃüÁ
LoadModule php5_module "c:/php/php5apache2_2.dll"
AddType application/x-httpd-php .php
µÚËIJ½£º²âÊԳɹ¦
£¨1£©±àдһ¸ö¼òµ¥µÄPHP²âÊÔÍøÒ³hello.php£¬ÆäÄÚÈÝÈçÏ£º
<html>
<head>
<title>hujiahui</title>
</head>
<body>
<?php echo 'Hello,world!'; ?>
</body>
</html>
½«Æä±£´æΪÎļþÃûhello.php£¬·ÅÈëC:\Program Files\Apache Software Foundation\Apache2.2\htdocsÎļþ¼ÐÏ¡£È»ºóÆô¶¯Apache£¬ÔÚä¯ÀÀÆ÷µØÖ·ÖÐÊäÈëhttp://localhost:8080/hello.php£¬ÏµÍ³´òÓ¡³ö”Hello.world!”¡£
£¨3£© ²âÊÔphpinfoº¯Êý£¬phpinfo.phpÍøÒ³ÄÚÈÝÈçÏ£º
<html>
<head>
<title>hujiahui</title>
</head>
<body>
<?php phpinfo(); ?>
</body>
</html>
±£´æΪphpinfo.php£¬È»ºóÊäÈëhttp://localhost:8080/phpinfo.php²âÊÔ£¬¿ÉÒԵõ½ºÜ¶à¹ØÓÚApacheºÍPHPµÄÅäÖÃÐÅÏ¢


Ïà¹ØÎĵµ£º

xmlÎĵµÀﺬÓÐÌØÊâ×Ö·ûʱµÄ´¦Àí·½·¨(php)

¡¡¡¡±¾ÎÄÊ×·¢´úÂëÌìÏÂ,תÔØÇë×¢Ã÷À´Ô´´úÂëÌìÏ£¬Ð»Ð»¡£
¡¡¡¡½ñÌìÉÏ°àʱÓöµ½Ò»¸öÎÊÌ⣬ÓÎÏ·¹Ù·´Ó¦Ò»¸öÓû§³ä²»ÁËÖµ¡£³ä²»ÁËÖµÒ»°ãΪÓû§½ÇÉ«²»ÕýÈ·£¬ÎÒ×Ðϸ¼ì²é·¢ÏÖ¸ÃÓû§½ÇÉ«ÓеãÒì³££¬ÒòΪ¶Ô·½·µ»Ø½ÇÉ«ÊÇxml£¬ÎÒÌùÉÏÀ´¸ø´ó¼Ò¿´Ò»Ï£º
<Result value="true" message="Success!">   <It ......

php×öÍøÕ¾¿ìÕÕͼƬ

Ö»ÄÜÊÇwindowÏÂ.
´Óphp ¹ÙÍøÉÏÏÂÔØ php_gd2.dll (5.2.2°æµÄ.)
Ìæ»»ÄãÔ­À´µÄgd2.
×Ô¶¯×¥È¡ÍøÕ¾Ò³Ãæ²¢±£´æΪһ¸öͼƬ.
ʵÏÖ´úÂëÈçÏÂ:
<?php
$browser = new COM("InternetExplorer.Application");
$handle = $browser->HWND;
$browser->Visible = true;
$browser->FullScreen = true;
$browser->Nav ......

phpÖÐÅжÏ×Ô¶¨Òå·½·¨ÊÇ·ñ´æÔÚ

<?php
 
 
  function myFun(){
   echo "hello,ÕÅÈý";
  }
 
  //ÀûÓÃfunction_exists·½·¨ÅжÏ×Ô¶¯ÒÔ·½·¨ÊÇ·ñ´æÔÚ
  //¸Ã·½·¨²ÎÊýΪҪÅжϵÄ×Ô¶¨Òå·½·¨µÄ·½·¨Ãû£¬¿ÉдΪ
  //"myFun"»òmyFun
  if(function_exists(myFun)){
   echo "´æÔÚ ......

Jquery php µã»÷td±ä³Éinput£¬Ð޸ĺóʧȥ½¹µã·¢ËÍÊý¾Ý

html²¿·Ö
<Td><?php echo $row['bigclassid']?></Td>
<td height="25" width="241" class="bigclassname"><?php echo $row['bigclassname']?></a></td>
Js²¿·Ö
<script>
/**//*
* ˵Ã÷£ºÓÃJqueryµÄ·½·¨£¬ÎÞË¢ÐÂÒ³Ã棬±à¼­±í¸ñ
*/
$(function() {
//¸øÒ³ ......

PHPÒ³Ãæ±àÂëͳһ

MySQLÊý¾Ý¿â±àÂë¡¢htmlÒ³Ãæ±àÂë¡¢PHP»òhtmlÎļþ±¾Éí±àÂëҪȫ²¿Ò»Ö¡£
1¡¢MySQLÊý¾Ý¿â±àÂ룺½¨Á¢Êý¾Ý¿âʱָ¶¨±àÂ루Èçgbk_chinese_ci)£¬½¨Á¢Êý¾Ý±í¡¢½¨Á¢×ֶΡ¢²åÈëÊý¾Ýʱ²»ÒªÖ¸¶¨±àÂ룬»á×Ô¶¯¼Ì³ÐÊý¾Ý¿âµÄ±àÂë¡£
Êý¾Ý¿âÁ¬½Óʱ£¬Ò²ÓбàÂ룬¿ÉÒÔÔÚÁ¬½ÓÍêÊý¾Ý¿âºó£¬Ö´ÐÐ
mysql_query(‘SET NAMES gbk’);//½«gbk» ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ