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
相关文档:
EClipse for PHP 中文乱码问题
UTF-8 格式的php,中文都是乱码.
如果此时在EClipse中输入中文会有 CP1252 错误( CP1252不支持xxxx )
解决方法:
windows->preferences->general 打开点击workspace 此时右侧出现text file encoding就是文本编码 default cp1252 点击other 下拉菜单 选择UTF-8 选择即可编译 ......
代码如下:
<?php
/* 网站验证码程序
* 运行环境: PHP5.0.18 下调试通过
* 需要 gd2 图形库支持(PHP.INI中 php_gd2.dll开启)
*&nbs ......
搜集不全,链接没有全部测试,大部分可用
Easy Template System
http://ets.sourceforge.net/
http://ets.sourceforge.net/ets.pdf
http://prdownloads.sourceforge.net/ets/ets305b.zip?download
Smarty
http://smarty.php.net/
FastTemplate
http://www.thewebmasters.net/php/FastTemplate.phtml
http://www ......
以前只弄过asp,最近有点兴趣来学下php,发现php比asp不是一般的功能强大。
刚开始偷了下懒,没有去php官网看帮助,英文的虽然看起来不难,但是还是习惯看中文,于是搜索了几篇有关php在iis上安装的文章,按照这些文章上的说明开始配置php。我就顶它个肺,配置起来问题千奇百怪,折腾了两天,也郁闷了两天。
得,索性看官 ......