【一】
當匯入excel資料置資料庫時
若有欄位有單引號,會顯示錯誤匯入不進去
解決方式:
單引號再加上右斜線  ’ --->  \'

cabuchi 發表在 痞客邦 留言(0) 人氣()

/*判斷是否為手持裝置*/
function is_mobile() {
        var mobiles = new Array("midp", "j2me", "avant", "docomo", "novarra",
                "palmos", "palmsource", "240x320", "opwv", "chtml", "pda",
                "windows ce", "mmp/", "blackberry", "mib/", "symbian", "wireless",
                "nokia", "hand", "mobi", "phone", "cdm", "up.b", "audio", "sie-",
                "sec-", "samsung", "htc", "mot-", "mitsu", "sagem", "sony", "alcatel",
                "lg", "eric", "vx", "NEC", "philips", "mmm", "xx", "panasonic",
                "sharp", "wap", "sch", "rover", "pocket", "benq", "java", "pt", "pg",
                "vox", "amoi", "bird", "compal", "kg", "voda", "sany", "kdd", "dbt",
                "sendo", "sgh", "gradi", "jb", "dddi", "moto", "iphone", "android",
                "iPod", "incognito", "webmate", "dream", "cupcake", "webos", "s8000",
                "bada", "googlebot-mobile")
        var ua = navigator.userAgent.toLowerCase();
        var isMobile = false;
        for ( var i = 0; i < mobiles.length; i++) {
            if (ua.indexOf(mobiles[i]) > 0) {
                isMobile = true;
                break;
            }
        }
        return isMobile;
}

cabuchi 發表在 痞客邦 留言(0) 人氣()

<script type="text/javascript" src="./js/jquery-1.8.0.js"></script>
<script type="text/javascript" defer>
$(function() {
   $.ajax({
                url : "js/jquery.tinyscrollbar.min.js",
                dataType : "script",
                async: false    // 先把這隻js執行完後,再跑下面的程式,如果不寫此參數,jQuery預設AJAX為異步執行
   });
   ......其他要執行的程式........
});
</script>

cabuchi 發表在 痞客邦 留言(0) 人氣()

由於IE7.8不接受HTML5
所以要加下面程式讓他支援此程式
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en" xmlns:fb="http://ogp.me/ns/fb#">

完整程式:

cabuchi 發表在 痞客邦 留言(0) 人氣()

Import CSV file directly into MySQL:
直接下MYSQL指令 先建立資料表以及欄位,再匯入scv檔案:
load data local infile 'D:/AppServ/www/test/geoip/ip2country/GeoIPCountryWhois.csv' into table tblUserIP fields terminated by ','
enclosed by '"'
lines terminated by '\n'
(uniqName, uniqCity, uniqComments,aname,bname,cname)

cabuchi 發表在 痞客邦 留言(0) 人氣()

由於系統預設沒有 TOKEN - [user:password]
我們可以藉由安裝下面兩項
達到再設定SHOWPASSWORD RECOVERY信件裡面(/admin/config/people/accounts)
可以抓到使用者原本設定密碼的TOKEN項目

cabuchi 發表在 痞客邦 留言(0) 人氣()

基本的網頁傳值,以前都換頁用POST/GET居多
但是使用此方法,需要轉頁
通常都會利用一個隱藏的input表單 偷偷利用js來做傳值的動作
程式如下:
<form action='./admin/edit_feature' method='post' id='product_list'>
<input type='hidden' id='product_id' name='product_id' value=''>

cabuchi 發表在 痞客邦 留言(1) 人氣()

從錯誤訊息來看是因為使用ZipArchive class沒有先把系統的php zip打開
所以才沒辦法使用。
在Windows的解決方法:

cabuchi 發表在 痞客邦 留言(0) 人氣()

現在新版的瀏覽器FF/Chrome/IE9都已經不會有嵌入iframe有白框邊的問題了
唯獨IE8/IE7還是會有
解決方法如下:
<iframe name="container" frameborder="0" allowtransparency="true" id="container" src="{$func_url}" width="100%"
height="auto" marginwidth="100%" marginheight="100%" border="0" scrolling="no" onload="Javascript:SetCwinHeight()">

cabuchi 發表在 痞客邦 留言(0) 人氣()

使用前要先下載並引入:jquery.cookie.js
(https://github.com/carhartl/jquery-cookie)
 

cabuchi 發表在 痞客邦 留言(0) 人氣()

 <iframe> 

Basic
<iframe id="ytplayer" width="460" height="289" src="http://www.youtube.com/embed/fxs970FMYIo" frameborder="0" allowfullscreen></iframe>
 

cabuchi 發表在 痞客邦 留言(0) 人氣()

/**
* html5doctor.com Reset Stylesheet v1.6.1 (http://html5doctor.com/html-5-reset-stylesheet/)
* Richard Clark (http://richclarkdesign.com)
* http://cssreset.com
*/
html, body, div, span,object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
abbr, address, cite, code,
del, dfn, em, img, ins, kbd, q, samp,
small, strong,sub, sup,var,
b, i,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td,
article, aside, canvas, details, figcaption, figure,
footer, header, hgroup, menu, nav, section, summary,
time, mark, audio, video {
margin:0;
padding:0;
border:0;
outline:0;
font-size:100%;
vertical-align:baseline;
background:transparent;
}
body {
line-height:1;
}
article,aside,details,figcaption,figure,
footer,header,hgroup,menu,nav,section {
display:block;
}
nav ul {
list-style:none;
}
blockquote, q {
quotes:none;
}
blockquote:before, blockquote:after,
q:before, q:after {
content:'';
content:none;
}
a {
margin:0;
padding:0;
font-size:100%;
vertical-align:baseline;
background:transparent;
}
/* change colours to suit your needs */
ins {
background-color:#ff9;
color:#000;
text-decoration:none;
}
/* change colours to suit your needs */
mark {
background-color:#ff9;
color:#000;
font-style:italic;
font-weight:bold;
}
del{
text-decoration: line-through;
}
abbr[title], dfn[title]{
border-bottom:1px dotted;
cursor:help;
}
table {
border-collapse:collapse;
border-spacing:0;
}
/* change border colour to suit your needs */
hr {
display:block;
height:1px;
border:0;
border-top:1px solid #cccccc;
margin:1em0;
padding:0;
}
input,select{
vertical-align:middle;
}

cabuchi 發表在 痞客邦 留言(0) 人氣()

Blog Stats
⚠️

成人內容提醒

本部落格內容僅限年滿十八歲者瀏覽。
若您未滿十八歲,請立即離開。

已滿十八歲者,亦請勿將內容提供給未成年人士。