2013年4月6日 星期六
google 地圖製作
在地圖頁中輸入地址,標示正確位置,若已建立商家資訊則可顯示出來商家位置
點選連結標籤,複製HTML 語法到網站或部落格,在HTML編輯模式中貼上,即可在您的網站或部落格顯示商家位置
顯示結果
檢視較大的地圖
2013年4月3日 星期三
2013年3月6日 星期三
網頁、php、Mysql 中文問題
1.欄位用中文,加上 mysql_query("SET NAMES ‘UTF8′");網頁編碼為big5
取出的欄位名稱會是亂碼;
栽 種 品 :
產 品 品 質 :
備 註:
同樣程式碼,網頁編碼為UTF8
2.欄位名稱用英文,select 使用中文別名,則出現錯誤訊息
mysql_query("SET NAMES ‘UTF8′");
$result=mysql_query("Select p_sn 產品序號 from cut ");
Warning: mysql_fetch_field(): supplied argument is not a valid MySQL result resource inC:\AppServ\www\manage\factor\cut.php on line 92
require("../factor/db.php"); //匯入資料庫設定檔
//require("../彥廷農場/checkform.php"); //匯入欄位檢查檔
//require("../彥廷農場/double.php"); //檢查帳號是否重覆
echo "";
/* 顯示會員資料 */
//mysql_query("SET NAMES ‘UTF8′");
$result=mysql_query("Select * from cut where 產品序號='12345' ");//,order by p_sn desc w_sn B, gdate 日期, product 收穫品, qul 品質, mess 備註
echo "<table border=1>\n";
echo "<tr>\n";
/*印出表頭*/
while ($field=mysql_fetch_field($result)) {
echo "<td>".$field->name."</td>\n";
}
echo "</tr>\n";
/*印出表身*/
while ($row=mysql_fetch_row($result)) {
echo "<tr>\n";
for ($i=0;$i<count($row);$i++ ){
echo "<td>".$row[$i]."</td>";
}
echo "<tr>\n";
}
?>
<form method="post" action="" accept-charset="big5">
*產 品 序 號 :<input type="text" name="p_sn"><br/>
*剪蒂人員編號:<input type="text" name="w_sn"><br/>
*日 期:<input type="date" name="gdate" ><br/>
栽 種 品 :<input type="text" name="product"><br/>
產 品 品 質 :<input type="text" name="qul"><br/>
備 註:<input type="text" name="mess"><br/>
<input type="submit" value="新增">
</form>
<?php
require("../factor/db.php");
$p_sn=$_POST['p_sn'];
$w_sn=$_POST["w_sn"];
$gdate=$_POST["gdate"];
$product=$_POST["product"];
$qul=$_POST["qul"];
$mess=$_POST["mess"];
/* 檢查帳號與密碼欄位是否為空白 */
if (empty($p_sn) || empty($w_sn) || empty($gdate))
{
echo "*號欄位一定要填喔!";
exit;
}
/* 將欄位資料插入資料庫 */
$sql="INSERT cut (p_sn,w_sn,gdate,product,qul,mess)
VALUES ('$p_sn','$w_sn','$gdate','$product','$qul','$mess')";
mysql_query($sql);
?>
取出的欄位名稱會是亂碼;
栽 種 品 :
產 品 品 質 :
備 註:
| �W�摨� | w_sn | gdate | product | qul | mess |
| 12345 | 2421241 | 0000-00-00 | qwdqwe | qwef | grggh |
| 12433425 | 3235 | 2013-01-23 | |||
| 12233 | 1231111111 | 0000-00-00 | |||
| 1214321 | 3235 | 0000-00-00 | |||
2.欄位名稱用英文,select 使用中文別名,則出現錯誤訊息
mysql_query("SET NAMES ‘UTF8′");
$result=mysql_query("Select p_sn 產品序號 from cut ");
Warning: mysql_fetch_field(): supplied argument is not a valid MySQL result resource inC:\AppServ\www\manage\factor\cut.php on line 92
require("../factor/db.php"); //匯入資料庫設定檔
//require("../彥廷農場/checkform.php"); //匯入欄位檢查檔
//require("../彥廷農場/double.php"); //檢查帳號是否重覆
echo "";
/* 顯示會員資料 */
//mysql_query("SET NAMES ‘UTF8′");
$result=mysql_query("Select * from cut where 產品序號='12345' ");//,order by p_sn desc w_sn B, gdate 日期, product 收穫品, qul 品質, mess 備註
echo "<table border=1>\n";
echo "<tr>\n";
/*印出表頭*/
while ($field=mysql_fetch_field($result)) {
echo "<td>".$field->name."</td>\n";
}
echo "</tr>\n";
/*印出表身*/
while ($row=mysql_fetch_row($result)) {
echo "<tr>\n";
for ($i=0;$i<count($row);$i++ ){
echo "<td>".$row[$i]."</td>";
}
echo "<tr>\n";
}
?>
<form method="post" action="" accept-charset="big5">
*產 品 序 號 :<input type="text" name="p_sn"><br/>
*剪蒂人員編號:<input type="text" name="w_sn"><br/>
*日 期:<input type="date" name="gdate" ><br/>
栽 種 品 :<input type="text" name="product"><br/>
產 品 品 質 :<input type="text" name="qul"><br/>
備 註:<input type="text" name="mess"><br/>
<input type="submit" value="新增">
</form>
<?php
require("../factor/db.php");
$p_sn=$_POST['p_sn'];
$w_sn=$_POST["w_sn"];
$gdate=$_POST["gdate"];
$product=$_POST["product"];
$qul=$_POST["qul"];
$mess=$_POST["mess"];
/* 檢查帳號與密碼欄位是否為空白 */
if (empty($p_sn) || empty($w_sn) || empty($gdate))
{
echo "*號欄位一定要填喔!";
exit;
}
/* 將欄位資料插入資料庫 */
$sql="INSERT cut (p_sn,w_sn,gdate,product,qul,mess)
VALUES ('$p_sn','$w_sn','$gdate','$product','$qul','$mess')";
mysql_query($sql);
?>
2013年2月14日 星期四
PHP 開啟錯誤
Warning: Unknown: failed to open stream: Invalid argument in Unknown on line 0
Fatal error: Unknown: Failed opening required 'C:/AppServ/www/manage/亂碼/google_qrcode.php' (include_path='.;C:\php5\pear') in Unknown on line 0
資料夾或檔案為中文所產生錯誤,
Fatal error: Unknown: Failed opening required 'C:/AppServ/www/manage/亂碼/google_qrcode.php' (include_path='.;C:\php5\pear') in Unknown on line 0
資料夾或檔案為中文所產生錯誤,
2013年1月21日 星期一
2012年11月19日 星期一
文章加入FB按讚功能
在編輯時切換至HTML將此語法貼到文章的前面或後面
<iframe src="http://www.facebook.com/plugins/like.php?href=<此處填入文章的網址,包刮刮號>&layout=standard&show-faces=true&width=450&height=60&action=like&colorscheme=light" scrolling="no" frameborder="0" allowTransparency="true" style="border:none;overflow:hidden;width:450px;height:60px"></iframe>
2012年11月14日 星期三
影片自動播放
<div align="center">
<embed height="360" src="http://www.youtube.com/embed/zDJfLjUTapA?&videoUrl=http%3A%2F%2Fvp.video.google.com%2Fvideodownload%3Fversion%3D0%26secureurl%3DpgAAACDFX7eWW_XUImJH3blqXSZY3BosL4uHk6acskywJc7MUPkU722J4S6dUMELuHucyeaRNPasN-zB6XUF3Mms0WQtxtV2d9zYio3vU4N3rNgMPhckBMbwORQIpjnZfE9DjztBW2kflFdYp4ebbsp53KStjQqUyYjVQ4eGouWA4fmo6b7LEd4jmz1AX0CyF0Ujq4FDn0Pfhz_VfjtZ5IEdCpXSWUKsFZTwN6f4ZBfqoaWb%26sigh%3DZackp6M39QxBv5em0Tcg7h0wrzA%26begin%3D0%26len%3D951866%26docid%3D-868097237758813769&messagesUrl=http%3A%2F%2Fvideo.google.tw%2FFlashUiStrings.xlb%3Fframe%3Dflashstrings%26hl%3Dzh-TW&thumbnailUrl=http%3A%2F%2Fvideo.google.com%2FThumbnailServer2%3Fapp%3Dvss%26contentid%3D3ca34f40e44e0522%26offsetms%3D370000%26itag%3Dw320%26lang%3Dzh%26sigh%3DYkk2VS5dfFGqKiWByE7b5vFSLNs&autoplay=1" width="480"></embed></div>
文章法表之語法
將語法複製,修改紅色的網址路徑即可
以下為新增欄位的自動播放語法
<p align="center"><embed src="http://video.google.com/googleplayer.swf?&videoUrl=http%3A%2F%2Fvp.video.google.com%2Fvideodownload%3Fversion%3D0%26secureurl%3DpgAAACDFX7eWW_XUImJH3blqXSZY3BosL4uHk6acskywJc7MUPkU722J4S6dUMELuHucyeaRNPasN-zB6XUF3Mms0WQtxtV2d9zYio3vU4N3rNgMPhckBMbwORQIpjnZfE9DjztBW2kflFdYp4ebbsp53KStjQqUyYjVQ4eGouWA4fmo6b7LEd4jmz1AX0CyF0Ujq4FDn0Pfhz_VfjtZ5IEdCpXSWUKsFZTwN6f4ZBfqoaWb%26sigh%3DZackp6M39QxBv5em0Tcg7h0wrzA%26begin%3D0%26len%3D951866%26docid%3D-868097237758813769&messagesUrl=http%3A%2F%2Fvideo.google.tw%2FFlashUiStrings.xlb%3Fframe%3Dflashstrings%26hl%3Dzh-TW&thumbnailUrl=http%3A%2F%2Fvideo.google.com%2FThumbnailServer2%3Fapp%3Dvss%26contentid%3D3ca34f40e44e0522%26offsetms%3D370000%26itag%3Dw320%26lang%3Dzh%26sigh%3DYkk2VS5dfFGqKiWByE7b5vFSLNs&autoplay=1" width="126" height="150"></embed></p>
將語法複製,修改紅色的網址路徑即可
引用自
http://tw.group.knowledge.yahoo.com/nkhs-9323005/article/view?aid=35
訂閱:
文章 (Atom)



