PHPѧϰ
Ç°¼¸ÌìÔÚѧϰPHPµÄʱºò×öÁËÒ»¸ö¼òµ¥µÄÊý¾ÝÔöɾ¸ÄµÄ³ÌÐò£¬ÓÉÓÚ×Ô¼ºÊǵÚÒ»´Î½Ó´¥PHPËùÒÔÔÚÐí¶àµØ·½×öµÄ²»µ½Î»£¬¸Ð¾õºÜǣǿ£¬µ«ÊDZϾ¹ÊÇ»¨ÁËʱ¼äµÄ£¬ËùÒÔÏÖÔÚÌù³öÀ´¡£
1.Íê³ÉÔöɾ²é¸ÄµÄÖ÷Ò³Ã棺connsql.php
<h1>Data Insert Delete Update</h1>
<?php
//»ñµÃÊý¾Ý¿âÁ¬½Ó
require("connectionDB.php");
// ´Ó±íÖÐÌáÈ¡ÐÅÏ¢µÄsqlÓï¾ä
$strsql="select * from personal_info";
// Ö´ÐÐsql²éѯ
$result=mysql_db_query($mysql_database, $strsql, $conn);
// »ñÈ¡²éѯ½á¹û
$row=mysql_fetch_row($result);
echo '<font face="verdana">';
echo '<table border="1" cellpadding="1" cellspacing="2">';
// ÏÔʾ×Ö¶ÎÃû³Æ
echo "\n<tr>\n";
for ($i=0; $i<mysql_num_fields($result); $i++)
{
echo '<td bgcolor="#EEFFFF"><b>'.
mysql_field_name($result, $i);
echo "</b></td>\n";
}
//ɾ³ý
echo '<td bgcolor="#EEFFFF">';
echo "delete";
echo '</td>';
//ÐÞ¸Ä
echo '<td bgcolor="#EEFFFF">';
echo "update";
echo '</td>';
echo "</tr>\n";
// ¶¨Î»µ½µÚÒ»Ìõ¼Ç¼
mysql_data_seek($result, 0);
// Ñ»·È¡³ö¼Ç¼
while ($row=mysql_fetch_row($result))
{
echo "<tr>\n";
for ($i=0; $i<mysql_num_fields($result); $i++ )
{
Ïà¹ØÎĵµ£º
×î½üÔÚ×öÒ»¸öÏîÄ¿£¬Óöµ½AJAXÖÐÎÄÂÒÂëÎÊÌ⣬¾¹ýÒ»¸öÏÂÎçµÄŬÁ¦ÖÕÓÚÍêÃÀ½â¾ö£¬ÏÖ½«ÐĵÃдÏÂÀ´£¬Ï£Íû¶ÔÄÇЩ»¹À§ÈÆÔÚÕâ¸öÎÊÌâ¶øÍ·Í´²»ÒѵÄÈËÃÇÓÐËù°ïÖú¡£
ÖÚËùÖÜÖª£¬Ê¹ÓÃAJAX´«ËͺͽÓÊÕÖÐÎIJÎÊýʱ£¬Èç¹û²»ÔÚ¿Í»§¶ËºÍ·þÎñÆ÷×öÏàÓ¦µÄ´¦Àí¾Í»á³öÏÖÂÒÂëÎÊÌ⣬ÔÚÍøÉÏÏàÓ¦µÄÎÄÕÂÒ²²»ÉÙ£¬µ«ÊÇÓеÄÇé¿öϺÜÄÑ´ÓÖÐÕÒµ½·ûºÏ×Ô¼ºÀíÏëµÄ´ð ......
basename: ·µ»Ø²»º¬Â·¾¶µÄÎļþ×Ö·û´®¡£
chgrp: ¸Ä±äÎļþËùÊôµÄȺ×é¡£
chmod: ¸Ä±äÎļþµÄÊôÐÔ¡£
chown: ¸Ä±äÎļþµÄÓµÓÐÕß¡£
clearstatcache: Çå³ýÎļþ״̬¿ìÈ¡¡£
copy: ¸´ÖÆÎļþ¡£
delete: ÎÞÓõÄÏîÄ¿¡£
dirname: È¡µÃ·¾¶ÖеÄĿ¼Ãû¡£
diskfreespace: È¡µÃĿ¼ËùÔÚµÄÊ£Óà¿ÉÓÿռ䡣
fclose: ¹Ø±ÕÒÑ´ò¿ªµÄ ......
ÍíÉÏÌØÒ⻨Á˸öʱ¼ä£¬×Ô¼º¶¯ÊÖÊÔÁËÏ¡£
ÔÚÏîÄ¿ÖÐÒ»Ö±Åöµ½Cookie¿çÓò·ÃÎʼ°SessionId¿çÓò´«µÝÎÊÌâ
·¶Àý£º
index.php
<?php
include_once('a.php');
session_start();
$_SESSION['k'] = uniqid();
setcookie("sess", session_id(), time()+3600, "/", ".ipggg.com");
echo "index.php<br />\n";
echo $ ......
php°²×°
# tar xzvf php-5.2.5.tar.gz
# cd php-5.2.5
./configure --prefix=/home/redadmin/php --with-apxs2=/home/redadmin/apache/bin/apxs --with-mysql=/home/redadmin/mysql --enable-mbstring=all --enable-track-vars
# make && make install
# cp php.ini-dist /home/redadmin/php/lib/php.ini
# c ......
×î½üÁ½ÌìÏîÄ¿ÐèÒª£¬ÓÉÓÚ·þÎñÆ÷ÕýÔÚ¿ª·¢£¬¿Í»§¶Ë½ø¶ÈÉÔ¿ìһЩ£¬Ã»ÓзþÎñÆ÷½øÐÐÁªµ÷¡£Òò´ËÎÒÖزپÉÒµ£¬ÓÃPHP¿ìËÙµÄдÁËһЩwebÒ³Ã棬ËãÊǵ±²âÊÔ×®³ÌÐòÁË£¬Æ߰˸öweb½Ó¿Ú£¬»ù±¾ÉÏ5µ½6¸öСʱ¸ã¶¨ÁË¡£ÓÉÓÚµ±Ç°µÄ·þÎñÆ÷ÐèÒªÓëÆäËû·þÎñÆ÷½øÐжԽӣ¬Òò´ËдµÄÕâ¸öweb·þÎñ»¹ÐèÒª³äµ±client½ÇÉ«£¬ÏòÆäËû·þÎñÆ÷·¢ËÍÇëÇó¡£
ÔÚÍøÉÏËÑÁËÒ» ......