¡¾PHP¡¿Ñ¡ÔñÌâÌâ¿âϵͳV1.0
Õâ¸öϵͳÆäʵÊÇÁ·Ï°php»ù±¾Óï·¨ºÍMySQLµÄ»ù±¾²éѯÓï¾ä¡£¸øÒ»ÆðѧϰµÄÅóÓÑ·ÖÏí¡£ ^_^
ÔÚphpÎļþÖУ¬Ë«Ð±¸ÜºóÃæÊÇ×¢ÊÍÓï¾ä£¬ÎÒÓÃÓ¢ÎÄдµÄ×¢ÊÍ¡£
Õû¸öϵͳËù°üº¬µÄ.htmºÍ.phpÎļþÓУº
add_que.htm——Ìí¼ÓÐÂÌâµÄÒ³Ãæ
insert.php——ÏÔʾÌí¼ÓÐÂÌâÐÅÏ¢µÄÒ³Ãæ
questionlist.php——ËùÓÐÎÊÌâÁбíÒ³Ãæ
search.htm——ËÑË÷ÎÊÌâµÄÒ³Ãæ
result.php——ËÑË÷½á¹ûµÄÒ³Ãæ
MysqlÄÚ£¬Ð½¨ÁË“query”µÄÊý¾Ý¿â£¬ÄÚ½¨“list”µÄÊý¾Ý±í¡£±íÄÚº¬ÓÐ7Ïid,question,a,b,c,d,key¡£questionΪÌâ¸É£¬a,b,c,dΪËĸöÑ¡ÏkeyΪ´ð°¸µÄÑ¡Ïî¡£
ÏÂÃæÊǸ÷¸öÎļþµÄ´úÂë.
/*add_que.htm*/----------------------------------------------------------------------
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<link href="index.css" mce_href="index.css" rel="stylesheet" type="text/css"/>
<title>Add Question</title>
</head>
<body>
<div style="margin: 0px auto;margin-top:100px; width: 500px;">
<form name="input" action="insert.php" method="get">
Please put your own question.<br />
<textarea cols="50" rows="5" name="question">
A.
B.
C.
D.
Choose The Right Answer:
A
B
C
D
Back To Question List
Search Question
/*insert.php*/----------------------------------------------------------------------
<title>Insert Page</title>
<body style="margin:0px auto; margin-top:180px; margin-left:450px; width: 500px;"></body>
<?php
$db=mysql_connect("localhost:3321","root","root","query");
mysql_set_charset('gb2312',$db);
if(!$db)
{
die('Connect Failed:'.mysql_error());
}
mysql_select_db("query",$db);
$sql="INSERT INTO `list` (`question`,`a`,`b`,`c`,`d`,`key`) VALUES ('$_GET[question]','$
Ïà¹ØÎĵµ£º
Tag:¡¡¡¡
-
1.
$query = $this->db->query('SELECT name, title, email from my_table');
foreach ($query->result() as $row)
{
echo $row->title;
echo $row->name;
echo $row->email;
}
2.
foreach ($query->result_array() as $row)
{
echo $row['title'];
echo $row['name'];
ech ......
//ת»»ÎªUNIXʱ¼ä´Á
function strtotimestamp(datestr)
{
var new_str = datestr.replace(/:/g,"-");
new_str = new_str.replace(/ /g,"-");
var arr = new_str.split("-");
var datum = new Date(Date. ......
PHP³ÌÐòÔ±Ó¦¸Ã¶¼ÖªµÀÁ¬½ÓMySQLÊý¾Ý¿â¿ÉÒÔʹÓÃmysql_pconnect£¨ÓÀ¾ÃÁ¬½Ó£©º¯Êý£¬Ê¹ÓÃÊý¾Ý¿âÓÀ¾ÃÁ¬½Ó¿ÉÒÔÌá¸ßЧÂÊ£¬µ«ÊÇʵ¼ÊÓ¦ÓÃÖÐÊý¾Ý¿âÓÀ¾ÃÁ¬½ÓÍùÍù»áµ¼Ö³öÏÖһЩÎÊÌ⣬ͨ³£µÄ±íÏÖ¾ÍÊÇÔÚ´ó·ÃÎÊÁ¿µÄÍøÕ¾ÉÏʱ³£·¢Éú¶Ï¶ÏÐøÐøµÄÎÞ·¨Á¬½ÓÊý¾Ý¿âµÄÇé¿ö£¬³öÏÖÀàËÆ£¢Too many connections in ...£¢µÄ´íÎóÌáʾÐÅÏ¢£¬ÖØÐÂÆô¶¯·þÎñÆ÷Ó ......
°²×°apache
# tar -zvxf httpd-2.2.14.tar.gz
# cd httpd-2.2.14
# ./configure --prefix=/usr/local/apache2 --enable-so --enable-rewrite
# make
# make install
°²×°MySQL
#yum -y install mysql-server
#yum -y install mysql-devel
°²×° jpeg7
½¨Á¢Ä¿Â¼£º
# mkdir -p /usr/local/jpeg7
# mkdir -p /usr/l ......
Ò»¡¢°²×°
³õ´ÎʹÓÃEclipse¿ª·¢PHPÏîÄ¿£¬°²×°»¹Êǵû¨·ÑÒ»¶¨µÄʱ¼äµÄ£¬×Ðϸ¿´Ò»Ï±¾
ÎÄ£¬¿ÉÒÔ½ÚÔ¼²»ÉÙʱ¼ä¡£Ê×ÏÈ¡£EclipseÏîÄ¿ÊÇÓÃJava¿ª·¢µÄ£¬ËùÒÔÐèÒªÔÚJavaµÄÐéÄâ»úÉÏÔËÐУ¬¶øEclipseȱʡÊÇûÓдøÐéÄâ»úµÄ£¬ËùÒÔÈç
¹ûÄãµÄ»úÆ÷ÉÏûÓа²×°JavaÐéÄâ»ú£¨Ò»°ãµÄWindows»úÆ÷É϶¼Ã»°²×°£©£¬ÄãÏȵð²×°Ò»¸ö£¬ÔÚÕâÀï˳±ã˵һÏ£ ......