Php Test
<?php
/*
Version: v1.0
CopyRight Davis.z 2010
Creation Date 2010-02-25
----------------------- Table Script ------------------------
CREATE TABLE [dbo].[T_Employee](
[Name] [nvarchar](50) COLLATE Korean_90_CS_AS NOT NULL,
[Age] [nvarchar](5) COLLATE Korean_90_CI_AS NULL,
[City] [nvarchar](50) COLLATE Korean_90_CI_AS NULL,
[Tel] [nvarchar](50) COLLATE Korean_90_CI_AS NULL
) ON [PRIMARY]
-------------------------------------------------------------
*/
?>
<html>
<head><title>Add Delete Study</title></head>
<style type="text/css">
table {
margin-left:100;
width: 40%;
height: 60px;
border-collapse:collapse;
border:#FF0000 solid;border-width:1 0 0 1
}
th {
text-align:Left;
padding:0;
border:#CC0066 solid;border-width:0 1 1 0
}
td {
padding:0;
border:#CC0066 solid;border-width:0 1 1 0
}
body {
color:#6699CC;
/* background-color:#6699CC */
}
.d1 {width:50px}
</style>
<body>
<?php
function GetDBConnection()
{
$server='192.168.10.98';
$username='Test';
$password='test';
$database='TestDB';
$connstr= "Driver={SQL Server};Server=$server;Database=$database";
$lconn=odbc_connect($connstr,$username,$password,SQL_CUR_USE_ODBC);
return $lconn;
}
$conn=GetDBConnection();
function SelectRecord($pconn)
{
$ss="select * from T_Employee";
$dataSet=odbc_exec($pconn,$ss);
if ($dataSet)
{
echo "<table>";
echo "<Caption><h1>Employee Infomation</h1></Caption>";
printf("<tr><th>%s</th><th>%s</th><th>%s</th><th>%s</th></tr>",'Name','Age','City','Tel');
while($rs=odbc_fetch_object($dataSet))
{
$name=$rs->Name;
$age=$rs->Age;
$city=$rs->City;
$tel=$rs->Tel;
if ($name=="") $name="&nbs
Ïà¹ØÎĵµ£º
www.diybl.com¡¡Ê±¼ä£º2008-06-01¡¡×÷Õß:ØýÃû
½«Æä±£´æ³ÉÒ»¸öÎļþ£¬ÓÃʱµ÷ÓÃ
<?
//ΪÁ˱ÜÃâÖظ´°üº¬Îļþ¶øÔì³É´íÎ󣬼ÓÁËÅжϺ¯ÊýÊÇ·ñ´æÔÚµÄÌõ¼þ£º
if(!function_exists(pageft)){
//¶¨Ò庯Êýpageft(),Èý¸ö²ÎÊýµÄº¬ÒåΪ£º
//$totle£ºÐÅÏ¢×ÜÊý£»
//$displaypg£ºÃ¿Ò³ÏÔʾÐÅÏ¢Êý£¬ÕâÀïÉèÖÃΪĬÈÏÊÇ20£»
//$url£º·Ö ......
1¡¢ÉçÍżò½é£º
LAMPÐÖµÜÁ¬ÉçÍÅ£¨¼ò³ÆÐÖµÜÁ¬£©ÊÇÒ×µÚÓŽÌÓýѧԺÁ쵼ϵÄÉçÍÅ×éÖ¯£¬ÊÇѧԺÁªÏµ¹ã´óLAMP°®ºÃÕßµÄÇÅÁººÍŦ´ø£¬ÊÇѧԺÉçÍŹÜÀíе÷µÄ»ú¹¹¡£
2¡¢ÉçÍÅÐÔÖÊ£º
ÓÉLAMPÐÖµÜÁ¬·¢Æð£¨www.lampbrother.net£©µÄÈ«¹úרҵÐÔ¡¢¹«ÒæÐÔÉç»áɳÁú×éÖ¯¡£
3¡¢ÉçÍÅÄ¿µÄ£º
a¡¢Îª°®ºÃLAMPµÄÅóÓÑÃǴһ¸öѧϰ½»Á÷µÄƽ̨
b¡¢Îª ......
½ñÌìÍ·ÄÔÒ»ÈÈ£¬Ïë¿´Ò»ÏÂÒ³ÃæÔÚÖ´ÐеĹý³ÌÖÐÕ¼ÓÃÁ˶àÉÙÄڴ棬ÎÒÒ²²»ÖªµÀÕâÑù×öµÄÄ¿µÄÊÇʲô£¬¿ÉÄÜÊdzöÓÚÎҵĹßÐÔ˼ά°É¡£²»¹ýÕâÑù×öÒ²²»ÊÇÍêȫûÓã¬
Äã¿ÉÒÔÇå³þµÄÖªµÀÄÄЩҳÃæÕ¼ÓõÄÄÚ´æ±È½Ï¶à£¬ÌرðÊǶÔÓÚʹÓù²ÓÃÖ÷»úµÄÍøÕ¾£¬Ò»°ã¿Õ¼äÉ̶¼»áÏÞÖÆÿ¸öÍøÕ¾µÄ×ÊÔ´Õ¼ÓÃÇé¿öµÄ£¨°üÀ¨cpuºÍÄڴ棩¡£ÍòÒ»ÔÚÎÒ
ÃDz»ÖªµÀµÄÇé¿öÏ£ ......
0¡¢Óõ¥ÒýºÅ´úÌæË«ÒýºÅÀ´°üº¬×Ö·û´®
£¬ÕâÑù×ö»á¸ü¿ìһЩ¡£ÒòΪPHP»áÔÚË«ÒýºÅ°üΧµÄ×Ö·û´®ÖÐËÑÑ°±äÁ¿£¬µ¥ÒýºÅÔò²»»á£¬×¢Ò⣺ֻÓÐechoÄÜÕâô×ö£¬ËüÊÇÒ»ÖÖ¿ÉÒ԰Ѷà¸ö×Ö·û´®µ±×÷²ÎÊýµÄ“º¯Êý”£¨Òë×¢£ºPHPÊÖ²áÖÐ˵echoÊÇÓïÑԽṹ£¬²»ÊÇÕæÕýµÄº¯Êý£¬¹Ê°Ñº¯Êý¼ÓÉÏÁËË«ÒýºÅ£©¡£
1¡¢Èç¹ûÄܽ«ÀàµÄ·½·¨¶¨Òå³Éstatic£¬¾Í¾ ......