Eclipse Debug PHP (¹ØÓÚZendDebugger)µÄʹÓÃ
Apache °æ±¾£º 2.2
PHP °æ±¾£º5.2.11
EclipseÏÂÔصØÖ·£ºhttp://downloads.zend.com/pdt/all-in-one/zend-eclipse-php-galileo-SR1-win32-x86.zip
½âѹºóÔËÐÐEclipse.exe
Ñ¡Ôñ¹¤×÷¿Õ¼ä
ÎÒÑ¡ÔñÁËE:\PHPworkspace
ÕâʱҪ²åÈëÒ»²½
´ò¿ªApacheµÄÅäÖÃÎļþhttpd.conf
²éÕÒ”DocumentRoot“
ÐÞ¸ÄdocumentrootµÄÖµ
DocumentRoot "E:/PHPworkspace"
½¨Á¢PHPÏîÄ¿
ÃüÃûΪ"DebugPHP"
´´½¨Ò»¸öPHPÎļþ£º“debug.php”
дÈë´úÂëÈçÏ£º
<HTML>
<BODY>
<H1>Debug Demo</H1>
<table border="1" width="700">
<tr bgcolor="red">
<th>Name</th>
<th>Address</th>
<th>Phone</th>
</tr>
<?php
$db = array(
array ("John", "E 10th St., NYC, NY 23742", "(212) 555-4456"),
array ("Francois", "12 Bd. de Grenelle, Paris, 74897","(33) 433-544"),
array ("Klaus", "312 Beethoven St., Frankfurt, Germany", "(44) 332-8065"),
array ("Shirly", "72 Independence St., Tel Aviv, Israel 67283", "(972) 156-7777"),
array ("Bill", "127 Maine St., San Francisco, CA 90298", "(415) 555-6565")
);
/**
@return string
@param i int
@desc Returns 'white' for even numbers and 'yellow' for odd numbers
*/
function row_color($i)
{
$bgcolor1 = "white";
$bgcolor2 = "yellow";
if ( ($i % 2) == 0 ) {
return $bgcolor1;
} else {
return $bgcolor2;
}
}
/**
@return void
@desc Displays a table of the workers
*/
function display_workers()
{
global $db;
for ($i=0, $n=count($db); $i<$n; $i++) {
$worker_data = $db[$i];
$worker_name = $worker_data[0];
$worker_address = $worker_data[1];
$worker_phone = $worker_data[2];
print "<tr bgcolor=\"".row_color($i)."\">\n";
print "<td>$worker_name</td>\n";
print "<td>$worker_address</td>\n";
Ïà¹ØÎĵµ£º
×¼±¸:
lighttpd-1.4.15.tar.gz
php-4.4.2.tar.gz
mysql-5.0.20a.tar.gz
¿ªÊ¼:
1 ±àÒë°²×°lighttpd
# tar zxvf lighttpd-1.4.15.tar.gz
# cd lighttpd-1.4.15
# ls
# ./configure --prefix=/usr/local/lighttpd //´Ë²¿ÎÞ·¨±àÒëʱÌáʾ°²×°prce-devel
#&nbs ......
phpÁ¬½Ómysql²âÊÔ´úÂ룺
$link=mysql_connect('localhost','root','123456');
if(!$link) echo "ʧ°Ü!";
else echo "³É¹¦!";
mysql_close();
?>
ÔËÐдúÂë³öÏÖ£ºCall to undefined function 'mysql_connect()'… ʧ°Ü
°Ù¶ÈÕÒµ½½á¹ûÊÇPHP+MYSQL »·¾³Ã ......
ÒòΪֻÓÐiis6.0²Å´øÓÐwebÀ©Õ¹¡£¶øiis6.0ÊÇĬÈÏ°²×°ÔÚwin2003µÄ¡£winxpÊDz»ÄÜ°²×°iis6.0µÄ¡£ÄÇÎÒÃǾÍÓÃiis5.1°É¡£
»·¾³£ºWINXP+IIS5.1
¿ªÊ¼Ö®Ç°ÇëÏÈÈ·¶¨ÄãµÄIIS°²×°ÊÇ·ñ³É¹¦£¬ÄÜ·ñͨ¹ýhttp://localhost
À´
·ÃÎÊ
Ò»¡¢Ïȵ½PHP¹Ù·½ÍøÏÂÔظöphp-5.2.5-Win32.zip
£¬µã»÷ÕâÀïÁ´½Óµ½¹Ù
ÍøÏÂÔصØÖ·
¶þ¡¢ÏÂÔغÃÖ®ºó£¬Ö±½ÓÈ«²¿ ......
/ ok
header('HTTP/1.1 200 OK');
//ÉèÖÃÒ»¸ö404Í·:
header('HTTP/1.1 404 Not Found');
//ÉèÖõØÖ·±»ÓÀ¾ÃµÄÖض¨Ïò
header('HTTP/1.1 301 Moved Permanently');
//תµ½Ò»¸öеØÖ·
header('Location: http://www.example.org/'
);
//ÎļþÑÓ³ÙתÏò:
header('Refresh: 10; url=http://www.example.org/');
print 'Y ......