自学php的几个例子(包含AMP(Apache、MySQL、PHP)环境搭建链接)
学习PHP之前需要先搭建PHP运行的环境(即服务器+PHP+数据库)来使PHP成功运行,具体环境搭建教程可参考pharen(http://www.cnblogs.com/pharen/archive/2012/02/06/2340628.html)的教程(亲测可用),教程中一些资源链接可能已经失效,下面给出部分资源链接:
PHP资源:http://windows.php.net/download#php-5.6
Apache(msi安装包)资源:http://archive.apache.org/dist/httpd/binaries/win32/
有几个要点需要注意(笔者作为菜鸡就被坑了):
(1)软件安装路径不要包含中文或者空格
(2)Apache版本要与PHP版本兼容,较老版本Apache无法支持新版本的PHP,例如:1、php5.2支持Apache2.0和Apache2.2;2、php5.3、php5.4同时支持Apache2.2和Apache2.4;3、php5.5只支持Apache2.4
(3)需要安装PHP编译器的运行环境,不同版本PHP需要的VC支持库版本也不同:
apache.org下载的Apache都是vc6版本,否则就根据不同文件说明安装不同的运行库。
vc11运行库x86/x64版本:http://www.microsoft.com/en-us/download/details.aspx?id=30679
vc10运行库x86版本:http://www.microsoft.com/en-us/download/details.aspx?id=5555
vc10运行库x64版本:http://www.microsoft.com/en-us/download/details.aspx?id=14632
vc9运行库x86版本:http://www.microsoft.com/en-us/download/details.aspx?id=5582
vc9运行库x64版本:http://www.microsoft.com/en-us/download/details.aspx?id=15336
常见问题参考资料连接如下:
(1)http://www.2cto.com/os/201312/264364.html
(2)http://jingyan.baidu.com/article/ceb9fb10d909c48cac2ba06c.html
php教程简要入门版可参见W3C(供入门菜鸟使用):
下面给出几个PHP学习粗浅的例子,仅供娱乐:
例子1:表单提交处理页面
formSubmit.php文件:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html lang="en" xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>php basis-1</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="author" content="Wayne Ng" />
<meta name="description" content="basis-1" />
<meta name="revised" content="Wayne Ng,2016/2/16" />
<style>
.errColor{color: red;}
</style>
</head>
<body>
<?php
function process_input($data){
$data = trim($data);
$data = stripslashes($data);
$data = htmlspecialchars($data);
return $data;
}
$name = $email = $website = $comment = $gender = "";
$nameErr = $emailErr = $genderErr = $websiteErr = "";
if($_SERVER["REQUEST_METHOD"] == "POST"){
//提取name信息
if(empty($_POST["name"])){
$nameErr = "名字是必须的";
}
else{
$name = process_input($_POST["name"]);
//检查名字是否仅包含字母和空格
if(!preg_match("/^[a-zA-Z ]*$/", $name)){
$nameErr = "名字只能包含英文字母和空格";
}
}
//提取email信息
if(empty($_POST["email"])){
$emailErr = "邮箱是必须的";
}
else{
$email = process_input($_POST["email"]);
//检查邮箱名字是否合法
if (!preg_match("/([\w\-]+\@[\w\-]+\.[\w\-]+)/",$email)) {
$emailErr = "无效的 email 格式!";
}
}
//提取website信息
if(empty($_POST["website"])){
$website = "";
}
else{
$website = process_input($_POST["website"]);
if (!preg_match("/\b(?:(?:https?|ftp):\/\/|www\.)[-a-z0-9+&@#\/%?=~_|!:,.;]*[-a-z0-9+&@#\/%
=~_|]/i",$website)) {
$websiteErr = "无效的 URL";
}
}
//提取comment信息
if(empty($_POST["comment"])){
$comment = "";
}
else{
$comment = process_input($_POST["comment"]);
}
//提取gender信息
if(empty($_POST["gender"])){
$genderErr = "性别是必须的";
}
else{
$gender = process_input($_POST["gender"]);
}
}
?>
<h2>PHP表单实例</h2>
<p><span class="errColor">* 必填项目</span></p>
<form method="post" action="<?php echo htmlspecialchars($_SERVER["PHP_SELF"]);?>">
姓名:    <input type="text" name="name" value="<?php echo $name;?>"/>
<span class="errColor">*<?php echo $nameErr;?></span><br />
邮箱:    <input type="text" name="email" value="<?php echo $email;?>"/>
<span class="errColor">*<?php echo $emailErr;?></span><br />
网址:    <input type="text" name="website" value="<?php echo $website;?>"/>
<span class="errColor"><?php echo $websiteErr;?></span><br />
评论:    <textarea name="comment" rows="5" cols="40"><?php echo $comment;?></textarea><br />
性别:   
<input type="radio" name="gender" <?php if(isset($gender) && $gender=="male") echo "checked";?> value="male">男
<input type="radio" name="gender" <?php if(isset($gender) && $gender=="female") echo "checked";?> value="female">女
<span class="errColor">*<?php echo $genderErr;?></span><br /><br />
<input type="submit" name="submit" value="提交表单">
</form>
<?php
echo "<h2>您提交的表单数据如下所示:</h2>";
echo "名字:  ".$name."<br />";
echo "邮箱:  ".$email."<br />";
echo "网址:  ".$website."<br />";
echo "评论:  ".$comment."<br />";
echo "性别:  ".$gender."<br />";
?>
</body>
</html>
显示效果:
aaarticlea/png;base64,iVBORw0KGgoAAAANSUhEUgAAAd0AAAILCAIAAAAi0NGWAAAgAElEQVR4nO3dX+wd5Z3f8blv1b2pVHrRdFVVai/jpPRipG72otJG26teBIPUQKRKj9Q7bixKLG62ZEWQGo9hJRbkaCWMdm3cNFXZHYF/mHRNCSELNiSBpBmzZn+QxjYGG/sHSMbV9OKcmXn+fJ9n/pw5v/OcmfdLP8n+nTP/f+d8znO+88w8SQkAiEmy6Q0AABjIZQCIC7kMAHEhlwEgLuQyAMSFXAaAuJDLABAXchkA4kIuA0BcyGUAiAu5DABxIZcBIC7kMgDEhVwGgLiQywAQF3IZAOJCLgNAXLY4l3OVLKl80MxpVniX23uRRZYmSe8Nqvah6wz1WgbsMoAtMcNcbuaTkll7tueC9Tk7zmiEucjaQnIZmIHYc9mIyQHE/PInqP6M1JxuD9IW5kKr1aVZ5tnPNCv0NjW5DMyAmcstKegmVbDNKj7ZcxVryWVjsZ5tk2ccN5ebWC58+0kuA/PTK5edYBk/l+1VjJjLwxfVbNCouWyHrBbT0mEkl4GZ6J3LiSfrRszljrHTt748bi4PrGlrmWtnbP07uQzMmy+X7fe953TYKrnccRXD89STb6ssyM7l5TKltJWb/YGIr6exDgy5DMxM11w2vsI34TJmLntWMX4ue3LP/4QvTN0tU3nXXNb2dbFauURCfRmYn+65LJ4rGzeX5dNxMeWyS4/TNCu6Vjr02Yymt0XltJeBudmC9rLPJurL1raaHx4qL7tWoN2rUD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n79m15avGymJb9G2nVugGxnKUlQQ5MhZTLwnXV3lw2H21C2B3rZP/dvHnz+DPPvHD6dFEUN27cuHHjRlEUL5w+ffyZZ27evCnM4HxZkG7032lneq/aXEePWM5VmaRlpsosK5OEdAYmQMvl+t4YKl9EQ6D56EnriHL59u3bTx8//vLLL3/00cenf/TKdx7/s+88/mcv/vUrH3388csvv/z08eNC03WkXNZX/ePX3vir0z/6q9M/+snfnAut2lhF39ZyUaZJmahe8wCIlpbLuUoSlS2SqMiyXM+g3nWMbrk85n2LLOfffPOF06cvX/nwu088/S/+4Ftf/4//+V//e/W7v3/395565sOrV184ffr8m2+Km7N6HaNe9XPPnzlz9tWfvPGz1879/JWfvP7SX78irbrTWp3PRE2uyjQrFY1lYCKaXF60DesWopmna6pjrDGXT548eeHChRde+t///N9+8+j//PGrH/6//3T2F//w9//Dl7528LXX37hw4cLJkyelzRmhvbxY9Ss/ef2ll1/7m/Nvn/vZL9/+1YULf/vez3/xy1+8/ba8am2F7gpa1qqSMi/LIqPJDEyDMe5qmhX6UFBaIoWSQXxu43WMo489duPGjYf+659++d/dl739m2+ee/dfPv3WP3r01Tu++vUjx/78xo0bRx97zJ5npFxerPovXzjzxlvv/PydXxfvXvzgg99cvnz50qXLb771M3nV9eL7xzKAiRmhn1zMufxH2bE7vvoH/+zIj3/3+2/d8adv/YOHf3zHV7/+xPH/du3atcf/5E/seUaqYyxWvfPS2V/++t33/u79y5cvX7t27fr169euXS8uXJBXXa/ePfj0mgNmxp/LoZCqKx3eJzeey39x4sS77777v1557UtfO/g7X/vm7/yXV//eH7369//NN//p1+7+Pxf+9t133/2LEyfseYJjq5Rl2bHpulj1+bd+/vY7v1qE8t7e3qeffvrxxx9funRJXnU5YAwvANO0envZmKNu2208l8+dO3d6Z+fq1Y+ePH7qn/zewTvu/MN//K/+8Eu/d/C/P/+jGzdunN7ZOXfuXMsi2mO6ZdVvnDv/d7u7169f39vb++STTz788MPAqquPOXONNJaB+Vk9l42n6l82nst1Z7X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3c1l3gvJ8/l5eDAqZZ72D2nHl0It/dpqp8IDeJu9ySODQWlH9Fvs8TezIAaCfncrCTnF1IdXN52fYemEbS7eDdTwYtLo2KsdNe7pXLwmNdVuS97b01GQC0G729PGb7sKkhBHI5kLbjtpdDs1snSRkoBMBw66tjiFP0VeWdU192R5rWnlghlwNjpwZWpD8XmgwA2vly2bh8rT2Xc1V1QZOCrnssWcVcs60qD4rqtFutHhh9h7yTrnp028vCKK3SSruMmAgABimXlfJ3fijd6ZvgkTJYay53+0pv1LbNWTO567HR3biwqh9DhiL19V/2rkgIcHEyihoA2knXYTsZHLyYxA5wxxg5RKABmA0zlz1Fh+D9MfYFuQxgNrbk/svkMoDZ2JJcBoDZIJcBIC7kMgDEhVwGgLiQywAQFzuXPT3lhl9Mvfk+dgCwVcK5rF2WLYWreNs5a7p9z2WGdAKw3aRcFq6r9uay+WgTwu5YJ/uFXAaw3bRcru+NsRgRb3nrYJknrcllAFiVlsu5Wt4aSOVlkWW5nrq96xhSLne4aK/PSKmesU19t6inyg1gOzS5vCha1KULs527X3WMziOldhkC1R2DlWgGED9j3NU0K/ShoMxGqDfTxOdWyeUOI6V2GQLVGZiPCgeAbTBCP7nRc7n/yE96KaNKX3e8VG5+BGAb+HM5cNavqXR4n1x3LrcPgeoZO5ZcBhC51dvLxhx6EWGNudxlCFS3vQwA22D1XDaeqn9Zby53GgKVcjKArbRqLpvhJ4Tw+tvLwhCoQn+M0hiODwCitVIuG+3U6gFrbm2B3fsvt//qH9vU23+Z1jOAreDLZc9ZM+0ijWacaOniDc9FHwCAFh3bywCAfcL9lwEgLuQyAMSFXAaAuJDLABAXchkA4vL/ATS7SmVfKqgqAAAAAElFTkSuQmCC" alt="" />
例子2:文件提交
FileSubmit.php文件:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html lang="en" xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>php basis-3</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="author" content="Wayne Ng" />
<meta name="description" content="basis-3" />
<meta name="revised" content="Wayne Ng,2016/2/17" />
<style>
.warning{color: red;}
</style>
</head>
<body> <h2>文件上传</h2>
<span class="warning">*文件大小必须小于100kb</span>
<form method="post" action="/uploadFile.php" enctype="multipart/form-data">
<label for="file">文件名:</label>
<input type="file" name="file" id="file" /><br />
<input type="submit" name="submit" value="提交" />
</form>
</body>
</html>
uploadFile文件:
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<?php
//限制上传文件大小(必须小于100kb)
if($_FILES["file"]["size"] < 100 * 1024){
if($_FILES["file"]["error"] > 0){
echo "Return Code: " . $_FILES["file"]["error"] . "<br />";
}
else{
echo "上传文件:".$_FILES["file"]["name"] . "<br />";
echo "文件类型:".$_FILES["file"]["type"] . "<br />";
echo "文件大小:".round($_FILES["file"]["size"]/1024, 1) . "kb<br />";
echo "临时文件:".$_FILES["file"]["tmp_name"] . "<br />";
//检验同名文件是都已经存在
if(file_exists("upload/" . $_FILES["file"]["name"])){
echo $_FILES["file"]["name"] . "已经存在!";
}
else{
move_uploaded_file($_FILES["file"]["tmp_name"], "upload/" . $_FILES["file"]["name"]);
echo "保存于:" . "upload/" . $_FILES["file"]["name"];
}
}
}
else{
echo "文件大小必须小于100kb";
}
?>
效果显示:
aaarticlea/png;base64,iVBORw0KGgoAAAANSUhEUgAAARcAAACgCAIAAACpCb/6AAAPd0lEQVR4nO2czU/cxhvH50/KRtqLRZO0B9p7RQiqRHvyoadcEEpQxGUTpRwao1SKEsGpUkV742I1BVVVE1UKJTRElCJcLlEOCWz1CwEiBSL5d/DLjmeeebEHdr3w/Qgpxh7bE/v5eF5sHhYDANxgva4AAH0PLALAFVgEgCuwCABXYBEArsAiAFyBRQC4AosAcAUWAeAKLALAFVgEgCuwCABXYBEArsAiAFyBRQC4AosAcAUWAeAKLALAFVgEgCuwCABXSlsUBR5jjDEviMrsFvq6fbK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S+FPrMo7AI1J+KFrXbWUrr4lIumehGlsG3TZaHRaCf0VlkyJn7JE9p/YRqi7iUvHOjTMzja5u1FxaB+qO06N27d+bMvSxPz6svN3Ljxnk+Te/sCDt/48aIxe7v3r2DRaDm6CzSJutlVyaS1LuLEw3FiKcxsbiYJfTl8/fmKztblcAiUH90FhmyfRJJQ7n0ojLZxplhZp9sFBaB+nMsFi1MNBJ5Zoa5pkj2Kd1cJmEvLAL1R2nRwcGBPnPvxsMsCW8nwS6Vr5cvn/b0DMl4eQ4ODmARqDk6i7QZcztJeO9fZpfv37/MWOPatUK+Xj7LL2Ms35Tk8TWl5E2ARaD+KC3a39/XZPpMUvKeGw/vDTE+W2+BoXtpAlIy/WiWnFSfund/fx8WgZpT0aKuAYtA/dFZ1OukvM+fP38Oi0D9UVq0t7fX66S8q6urq3t7e7AI1Bxl3oUXL1602+3eJuZtt9svXrxA3gVQc2iLpqam7ty58/Lly72e8vLlyzt37kwhBxCoN8p8dLdv3x4bGzvJbHNmxsbGbt++3c3LAUAFkBsVAFdgEQCuwCIAXIFFALgCiwBwBRYB4AosAsAVWASAK7AIAFdgEQCuwCIAXIFFALgCiwBwBRYB4AosAsAVWASAK7AIAFdgEQCuwCIAXPk/bWfzGG4kcgEAAAAASUVORK5CYII=" alt="" />
例子3:文件读写操作
fileOperation.php文件:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html lang="en" xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>php basis-2</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="author" content="Wayne Ng" />
<meta name="description" content="basis-2" />
<meta name="revised" content="Wayne Ng,2016/2/17" />
</head>
<body>
<?php
function printFile($file){
while(!feof($file)){
echo fgets($file)."<br />";
}
}
$fileName = "spam.txt";
//查看原始文件内容
echo "文件原始内容:<br />";
$fileContent = fopen($fileName, 'r') or die("Unable to open file!");
printFile($fileContent);
fclose($fileContent);
//文件末尾追加内容
$fileContent = fopen($fileName, 'a+') or die("Unable to open file!");
fwrite($fileContent, "Maybe carrot doesn't tastes terrible.\n");
fclose($fileContent);
//查看修改后文件内容
echo "文件修改后的内容:<br />";
$fileContent = fopen($fileName, 'r') or die("Unable to open file!");
printFile($fileContent);
fclose($fileContent); ?>
</body>
</html>
显示效果:
aaarticlea/png;base64,iVBORw0KGgoAAAANSUhEUgAAAZAAAAC3CAIAAACzA5+hAAAO20lEQVR4nO2dUaKjKgxAXZcLYj2uxs24mPs+bJWEBLClr6Zzzs9MrQLtLacQIZ3+AACCMH27AQAAvSAsAAgDwgKAMCAsAAgDwgKAMCAsAAgDwgKAMHQLa1vmaV62T7YFAKDKhRHWmqZpSmv1HFNraxqjOrucNTVb9UoztmXuLBcA/i8uTQmbbsh9dZ5sm2Jb5qmL57XbMpe1mwfd1l/yJsoCuBumsLpdIo0i7JHpwReW1EFj1mkVcx5rD7SqwlpT76tFYQBfozHC8jr5mibTHrmvGj3+EFZVj/OyWYXtZWzLnDVCKatPQYZfK1wYzwHAeBrCcnqoNRbavXOYJLusMcJyLSBqOc86/rcmeZ2cwxW1FgecAaEyX15qTVjbMhsSB4CBtGJY5jTNOPgcJj1NosY6LWHVR1iykMf/1jSlZI2iHjXrWu0pqDyyj8rmZfvbtiW7x/BoYjN+h7AAPko76F4Gh8oju8HWhwDkTG3MCEsOsOZlSXJKV7ZN1Wr4JK84Hx8ejxZ5DVF4gC/TcZdQjaes6Paa5mVzzTNCWOf0r/dmnzzvjGjJyZ552zE/S5oMAL5J17KGc2hRHWQ8BNC8x7h75NKUUAycznmnPyEUwspGV/lASwlLzGoVe2VoC+C79K7DOvRQ6bTXRljHUXFZPn6TQ7t93Wqqre7SJZ23GIvJ4dOspwWnbKJp8wiZEacC+BbdC0c7jHVJWOJkqY60Vq6pre4qhJWSMyBc0yNEVUTnHB2xoAHgBnTGsMTczLPWFWGpJQXTvKzb9qfnfqK4fTqanod7R1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:
<?xml version = "1.0" encoding = "UTF-8"?>
<!DOCTYPE game SYSTEM "game.dtd">
<!--
Date:2016/1/26
Writer:Wayne Ng
Theme:MapleStory hero briefInstruction
-->
<game>
<warrior>
<hero>
<name>英雄</name>
<weapons>剑、斧、钝器</weapons>
<skill>终极打击</skill>
</hero>
<hero>
<name>圣骑士</name>
<weapons>剑、钝器</weapons>
<skill>神圣冲击</skill>
</hero>
<hero>
<name>黑骑士</name>
<weapons>长枪、矛</weapons>
<skill>黑暗穿刺</skill>
</hero>
</warrior>
<magician>
<hero>
<name>主教</name>
<weapons>长杖、短仗</weapons>
<skill>圣光普照</skill>
</hero>
<hero>
<name>火毒法师</name>
<weapons>长杖、短仗</weapons>
<skill>末日火焰</skill>
</hero>
<hero>
<name>冰雷法师</name>
<weapons>长杖、短仗</weapons>
<skill>冰咆哮</skill>
</hero>
</magician>
<archer>
<hero>
<name>神射手</name>
<weapons>弓</weapons>
<skill>暴风箭雨</skill>
</hero>
<hero>
<name>箭神</name>
<weapons>弩</weapons>
<skill>终极扫射</skill>
</hero>
</archer>
<ranger>
<hero>
<name>侠盗</name>
<weapons>短剑、短刀</weapons>
<skill>暗杀</skill>
</hero>
<hero>
<name>隐士</name>
<weapons>拳套</weapons>
<skill>四连镖</skill>
</hero>
<hero>
<name>暗影双刀</name>
<weapons>短剑、短刀</weapons>
<skill>终极斩</skill>
</hero>
</ranger>
</game>
expatParser.php文件:
<?php
header("Content-type: text/html; charset=utf-8");
//初始化XML解析器
$parser = xml_parser_create();
//当遇到元素头部(如<body>)时回调函数
function start($parser, $element_name, $element_attrs){
switch($element_name){
case "WARRIOR":
{echo "<h2>warrior</h2>";break;}
case "MAGICIAN":
{echo "<h2>magician</h2>";break;}
case "ARCHER":
{echo "<h2>archer</h2>";break;}
case "RANGER":
{echo "<h2>ranger</h2>";break;}
case "NAME":
{echo "名称: ";break;}
case "WEAPONS":
{echo "武器: ";break;}
case "SKILL":
{echo "技能: ";break;}
}
}
//当遇到元素尾部(如</body>)时回调函数
function stop($parser, $element_name){
switch($element_name){
case"NAME":
{echo "<br />";break;}
case"WEAPONS":
{echo "<br />";break;}
case"SKILL":
{echo "<br /><br />";break;}
}
}
//当遇到元素包含字符数据时回调函数
function char($parser, $data){
echo $data;
}
//指定元素处理回调函数
xml_set_element_handler($parser, "start", "stop");
//指定数据处理回调函数
xml_set_character_data_handler($parser, "char"); $fp = fopen("game.xml", 'r');
//读取数据
while($data = fread($fp, 1024)){
xml_parse($parser, $data, feof($fp)) or die
(sprintf("XML Error: %s at line %d",
xml_error_string(xml_get_error_code($parser)),
xml_get_current_line_number($parser)));
}
//释放xml解析器
xml_parser_free($parser); ?>
显示效果:
aaarticlea/png;base64,iVBORw0KGgoAAAANSUhEUgAAAckAAAKICAIAAACUsZZyAAAgAElEQVR4nO3dW2LjIAxGYa+LBbEer8ab8WIyD76BECBsZZo253uZaeJb+vBXkTFMLwCAt+mnLwAA/iCyFQD8ka0A4I9sBQB/ZCsA+CNbAcAf2QoA/shWAPBHtgKAP7IVAPyRrQDgj2wFAH+/LluXOG3i8tOXAgA1vyxbz2QlXQF8MrIVAPz9smylJwDgV/h12QoAvwDZCgD+zmxNOplhXtNNknfS7+HrHJSXs4aodjTlVPnX/LF364e2baWcAgAeu+rWWmpVbh+V0Zq80g647ExzcvgyPdvvpgdtnL0IzfYpAOCxpCeg16d5JXjl2fX6sXEz3dIgLIvLSnq2300O2Q7WwQsAgMfSfqsWrjK1joi6Xj9Da52DDCc9CUW01fdpv5ud2BCi2t8FEhXAW2T3sq7MkREao2hJnptq/cyL2pRtD1I1v1vGvLJD+uZ5qYySBfBmWbYmQbTn0J5CYV7Ot+KSblm/7yXp2Vomm/nd49Tjh2vvAQCP5WOwZJl5Ruuap6kWrb2ep5qtStU7/G57h/SylGxtl90AcI8Y35qH65FB+V2k5I16X/ZnsnW8biVbAbyDfHYgvUd19AFkizXOx0ZqtHYHwTpnq9pSVS5A7beSrQDeoXgu6wqj4/5VkWEhyGhVOrWvV/Wek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7IVAPyRrQDgj2wFAH9kKwD4I1sBwB/ZCgD+yFYA8Ee2AoA/shUA/JGtAOCPbAUAf2QrAPgjWwHAH9kKAP7IVgDwR7YCgD+yFQD8ka0A4O8fHn4/grX17o0AAAAASUVORK5CYII=" alt="" />
例子5:利用php的PDO接口访问MySQL数据库(具体使用数据在前面MySQL例子(http://www.cnblogs.com/yemajun/p/5189554.html)中已经给出)
process_db.php文件;
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<?php $connect = mysql_connect("localhost", "****", "**********");//***分别代表名字和密码
//连接MySQL数据库
if(!$connect){
die("Could not connect: ". mysql_error());
}
else{
echo "Successed to connect MySQL.";
}
echo "<br />";
// 创建数据库(database)
if(mysql_query("CREATE DATABASE my_db", $connect)){
echo "Success to create database.";
}
else{
echo "Error to create database: " . mysql_error();
}
echo "<br />";
// 创建表(table)
mysql_select_db("my_db", $connect);
$table_sql = "CREATE TABLE Persons(
firstName VARCHAR(15),
lastName VARCHAR(15),
Age INT
);";
if(mysql_query($table_sql)){
echo "Success to create table.";
}
else{
echo "Error to create table: " . mysql_error();
}
echo "<br />";
// 添加数据
$insert_sql = "INSERT INTO Persons VALUES('Wayne', 'Ng', '26')";
if(mysql_query($insert_sql)){
echo "Success to insert data.";
}
else{
echo "Error to insert data: " . mysql_error();
}
echo "<br />";
// 查询结果并显示于html表格中
mysql_select_db("game_db", $connect);
$result = mysql_query("SELECT * FROM game");
echo"<h2>冒险岛游戏数据</h2>
<table border='1'>
<tr>
<th>ID</th>
<th>JOB_NAME</th>
<th>WEAPONS</th>
<th>SKILLS</th>
<th>HERO_TYPES</th>
</tr>
";
while($row = mysql_fetch_array($result)){
echo "<tr>";
echo "<td>" . $row["id"]."</td>";
echo "<td>" . $row["job_name"]."</td>";
echo "<td>" . $row["weapons"]."</td>";
echo "<td>" . $row["skills"]."</td>";
echo "<td>" . $row["hero_type"]."</td>";
echo "</tr>";
}
echo "</table>";
//终止连接
mysql_close($connect);
?>
显示效果:
aaarticlea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d4tIGKhJB/j7/VbeMSDBxYB9cmnPYu21qAhVm9GT4H+nuaqcVoF9cmnPYu21qAizGVuTYAAAqAhIMAAAFKMRCf4DAIA6eV5DT6JIMAAAgGeABAMAQDEgwQAAUAxIMAAAFAMSDAAAxYAEAwBAMSDBAABQDEgwAAAUAxIMAADFgAQDAEAxIMEAAFAMSDAAABQDEgwAAMWABAMAQDEgwQAAUAxIMAAAFAMSDAAAxYAEAwBAMSDBAABQDEgwAAAUAxIMAADFgAQDAEAxIMEAAFAMSDAAABQDEgwAAMX4D03LhUsbfQBpAAAAAElFTkSuQmCC" alt="" />
例子6:Ajax简单例子
suggestion.html文件:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html lang="en" xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>php basis-3</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="author" content="Wayne Ng" />
<meta name="description" content="name suggestion" />
<meta name="revised" content="Wayne Ng,2016/2/17" />
</head>
<body>
<h2>名字提示</h2>
<p>显示以该英文开头的英文名</p>
<form>
First Name:
<input type="text" id="txt1" onkeyup="showHint(this.value)"/>
</form>
<p>Suggestion:<span id="txtHint"></span></p>
</body>
<script src="clientHint.js"></script>
</html>
clientHint.js文件:
var xmlHttp;
//从对应php脚本发送请求并获取信息
function showHint(str){
if(str.length == 0){
document.getElementById("txtHint").innerHTML="";
return;
}
xmlHttp=GetXmlHttpObject(); //获得xmlhttp对象
if(xmlHttp == null){
alert("浏览器不支持HTTP请求");
return;
}
var url="getHint.php";
url = url + "?q=" + str + "&sid=" + Math.random();
xmlHttp.onreadystatechange=stateChanged;
xmlHttp.open("GET", url, true);
xmlHttp.send(null);
} //AJAX对应处理函数
function stateChanged(){
if(xmlHttp.readyState == 4 || xmlHttp.readyState == "complete"){
document.getElementById("txtHint").innerHTML=xmlHttp.responseText;
}
} //创建对应HTTP对象
function GetXmlHttpObject(){
var xmlHttp = null;
try{
//FireFox, Opera 8.0+, Safari
xmlHttp = new XMLHttpRequest();
}
catch(e){
//IE
try{
xmlHttp = new ActiveXObject("Msxml2.XMLHTTP");
}
catch (e)
{
xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
}
}
return xmlHttp;
}
getHint.php文件:
<?php
// Fill up array with names
$a[]="Anna";
$a[]="Brittany";
$a[]="Cinderella";
$a[]="Diana";
$a[]="Eva";
$a[]="Fiona";
$a[]="Gunda";
$a[]="Hege";
$a[]="Inga";
$a[]="Johanna";
$a[]="Kitty";
$a[]="Linda";
$a[]="Nina";
$a[]="Ophelia";
$a[]="Petunia";
$a[]="Amanda";
$a[]="Raquel";
$a[]="Cindy";
$a[]="Doris";
$a[]="Eve";
$a[]="Evita";
$a[]="Sunniva";
$a[]="Tove";
$a[]="Unni";
$a[]="Violet";
$a[]="Liza";
$a[]="Elizabeth";
$a[]="Ellen";
$a[]="Wenche";
$a[]="Vicky"; //从URL中获取q的参数
$q=$_GET["q"]; //从字典中查找以$q开头的英文,并生成结果
if (strlen($q) > 0)
{
$hint="";
for($i=0; $i<count($a); $i++)
{
if (strtolower($q)==strtolower(substr($a[$i],0,strlen($q))))
{
if ($hint=="")
{
$hint=$a[$i];
}
else
{
$hint=$hint." , ".$a[$i];
}
}
}
} //判断$hint是否为空,并返回对应结果
if ($hint == "")
{
$response="no suggestion";
}
else
{
$response=$hint;
} //输出响应
echo $response;
?>
显示效果:
aaarticlea/png;base64,iVBORw0KGgoAAAANSUhEUgAAAUMAAAClCAIAAABJOwh7AAALuklEQVR4nO2dPc7zNhKAdS5eZG/AK+QaKvYSuYBSbprFFimDRYBVlyJBFtjiS5XOW9iSyOEMRdqWX2v8PPiAxJJMUX75aPgje4YLAJyf4asrAABPAJMBPIDJAB7AZAAPYDKABzAZwAOYDOABTAbwACYDeACTATyAyQAewGQAD2AygAcUk6c4LMTpKSeZx9BV3lqDMM5PqQCAdwqTn+7xqnF7kZrJSb0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zm4+mGQw9iFWp1OgsmisllO8uiTmWXNT1s9Q0Mk0s/86KsEUF+/Gp+GgzX+1Ead2vVbrnTGZVJP8/jJ87BL/p6ctJV1Vue0syWtljZJVe71HGs3Nhsshnfrei2RN0piigpN9aqXTFZ7R1XTK58MgA7DGbPM+mpHhiTDUSH/JCYvNiaTXMtR2cba9U+LCYD9GDMXe+OA4uWus3RVHZ1DP7UANsxTm4x+TLF6zyynA8PMSp21+upVNsaJ1vHE4Hhbpa567TRJQFRmV594tx1eirR8vXpq4656yYP5zGEILvBt6ssF8i0atvnyt+y3t4aj8//CAB7qE9riga07b0unGa9Tn1PbVe5bFy+R1ma7l5PvhQvjR659EVfAjKqXbtrmOvJLccToaGH532Dor0HCgDP5l6TlacdjWc8mMwBOJ4HYnLeJbc6vXQTAV4A308G8AAmA3gAkwE8gMkAHsBkAA9gMoAHMBnAA5gM4AFMBvAAJgN4AJMBPPB/x8NMtr+y+AEAAAAASUVORK5CYII=" alt="" />
修订于2016/2/20 By野马菌
自学php的几个例子(包含AMP(Apache、MySQL、PHP)环境搭建链接)的更多相关文章
- Python 自学笔记(一)环境搭建
一,关于Python的介绍 关于Python的介绍,我不想多说了,网上随便一搜,很多介绍,这里我主要写下我的自学Python的 过程,也是为了促进我能继续学习下去. 二,环境搭建 1,这里我只讲解Wi ...
- 自学PHP 环境搭建
自学PHP之环境搭建 一..首先 安装 phpStudy2013.exe 程序集成包 安装完可能端口被占用 需要手动设置 然后打开http://localhost:8080/phpMyAdmin/ ...
- 孤荷凌寒自学python第八十三天初次接触ocr配置tesseract环境
孤荷凌寒自学python第八十三天初次接触ocr配置tesseract环境 (完整学习过程屏幕记录视频地址在文末) 学习Python我肯定不会错过图片文字的识别,当然更重要的是简单的验证码识别了,今天 ...
- Win10 Anaconda下TensorFlow-GPU环境搭建详细教程(包含CUDA+cuDNN安装过程)(转载)
win7(win10也适用)系统安装GPU/CPU版tensorflow Win10 Anaconda下TensorFlow-GPU环境搭建详细教程(包含CUDA+cuDNN安装过程) 目录 2.配置 ...
- Springboot环境搭建_第一个例子
首先创建一个maven项目 maven项目创建完成之后,找到pom.xml配置节点.需要springboot-starter-web ,springboot-starter-test,springbo ...
- 基于Qt Designer和PyQt5的桌面软件开发--环境搭建和入门例子
本文介绍了如何使用技术栈PyCharm+Qt Designer+PyQt5来开发桌面软件,从环境搭建.例子演示到对容易混淆概念的解释.文中用到的全部软件+代码下载链接为:https://url39 ...
- 自学HTML的几个例子
此处不赘述HTML中不同标签的用法仅仅给出自己学习时写的一些自娱自乐的例子,具体标签用法请参考W3C(http://www.w3school.com.cn/),毕竟这个才是最靠谱的,请不要相信任何二道 ...
- 自学Xpath的几个例子
Xpath可以对XML文件中的信息进行查找,并对XML文件树形结构进行遍历.详细语法请转:http://www.w3school.com.cn/xpath/index.asp 例子:利用在JavaSc ...
- 自学XSL的几个例子
XSL 指扩展样式表语言(EXtensible Stylesheet Language).XSL用来描述XML文件的格式,类似于我们可以用CSS描述HTML的格式.具体用法请转:http://www. ...
随机推荐
- 杭电oj 2037 今年暑假不AC
Tips:贪心算法的典型应用,可以按照节目结束时间由小到大排序,(至于结束时间相同的,有些人说按开始时间早的排序,不过个人认为不必处理,因为结束时间一样,两个之中要么都没有,要么必有一个)然后再依次进 ...
- flex——dictionary跟Object的区别与遍历
AS3中Object和 Dictionary都可以用来保存key-value形式的数据,Dictionary类和Object唯一的区别在于:Dictionary对象可以使用非字符串作为键值对的键.例如 ...
- 最少步数(dfs + bfs +bfs优化)
最少步数 时间限制:3000 ms | 内存限制:65535 KB 难度:4 描述 这有一个迷宫,有0~8行和0~8列: 1,1,1,1,1,1,1,1,1 1,0,0,1,0,0,1,0,1 ...
- java分页数据导出excel
/** * 订单导出(用于统计利润) * @return */ public String orderExport() throws IOException{ if (queryOrderList_c ...
- Android_通过ContentObserver监听短信数据变化
1.简单介绍 在小米等一些机型,无法接收系统发出的短信广播. 仅仅能通过观察者ContentObserver,去监听短信数据的变化 2.SMS数据介绍 content://sms/inbox ...
- MS sqlserver 获取某月某年的天数
--定义传入时间 ) set @datetime='2012-02-01' --定义月的天数 declare @dayCountM int --定义年的天数 declare @dayCountY in ...
- web中通过注释判断浏览器<!--[if !IE]><!--[if IE]><!--[if lt IE 6]><!--[if gte IE 6]>版本
<!--[if !IE]><!--> 除IE外都可识别 <!--<![endif]--><!--[if IE]> 所有的IE可识别 <![e ...
- for练习--侦察兵
static void Main21侦察兵(string[] args) { //某侦察队接到一项紧急任务,要求在A.B.C.D.E.F六个队员中尽可能多地挑若干人,但有以下限制条件: //侦察兵A和 ...
- Unicode解码、URL编码/解码
+ (NSString *) stringByReplaceUnicode:(NSString *)string { NSMutableString *convertedString = [strin ...
- php5.6解决curl扩展不生效的问题
最近在本机安装PHP环境,遇到一个奇粑问题,本地安装的php5.2.php5.3.php5.4都需要做常规设置,即可正常使用.安装php5.5.php5.6时php_curl按各种方法进行配制,都无法 ...