因為一次跳電,使用原本的電腦主機板掛掉,連帶的系統C槽也一起掛掉,還好資料槽D跟E都沒事,只好趕快重新弄一台

前一版wamp是2.5版,php 5.5.12 、 mysql 5.6.17 、 apache 2.4.9

以下分幾個部份紀錄

1.安裝wamp 3.1.0 x64版(php 5.6.31 、 mysql 5.7.19 、 apache 2.4.27)

這部份很簡單,指定好要安裝的路徑,基本上,應該不會有太大的問題。以我為例,我是指定到D:/wamp64

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

  • Nov 20 Thu 2014 19:50
  • 36

busy year

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

安裝環境

windows 7 x64

wamp 2.4

apache 2.4.4

解法方法

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

使用php時常會遇到要讓使用者上傳檔案的情況

除了在form要設定enctype="multipart/form-data"之外

還可以使用官方所提供的error_code來得知檔案上傳的情況

以下說明的error code自php 4.3.0版開始成為內定常建功能

A.代號是 0 ;上傳正常,且完成上傳

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

  • Nov 20 Wed 2013 23:59
  • 35

內容待補

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

utf-8 編碼網頁無法在 big5 系統正確處理中文檔名,原因在於 move_uploaded_file() 不能處理 utf-8 中文編碼,需利用 iconv() 函數作轉碼,解決方法如下:

請將

 move_uploaded_file($_FILES['myfile']['tmp_name'], $uploadfile)

改為

move_uploaded_file($_FILES['myfile']['tmp_name'], iconv("utf-8", "big5", $uploadfile))

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

參考網址 http://php.net/manual/en/function.count.php

example:

$myArray = array('a', 'b', 'c');

echo count($myArray)

會得到3

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


參考網址 http://phpdocs.epesi.org/PHPMailer/PHPMailer.html

參考網址 http://phpmailer.worxware.com/index.php?pg=methods

A開頭:
        $AltBody --屬性
         出自:PHPMailer::$AltBody ,文件:class.phpmailer.php

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

其實還蠻簡單的

我自己是用centos

1.先使用wget 下載最新版的phpmyadmin (寫此文章時是3.5.6版)

2.使用tar -zxvf 解壓縮

3.使用mv改成你要的名字

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

出現亂碼或問題, 大概都是編碼的問題

1.在mysql server裡面的DB或table要設定為 utf8_general_ci 或 utf8_unicode_ci

2.在php的header要設定charset utf-8

3.使用mysql_query之前要先執行mysql_query("set names 'utf8'");

4.瀏覽器的預設編碼改為utf8

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

mysql

在mysql中

那 int(5) 跟 smallint(5)有什麼差別呢?

以下摘至mysql官方manual

MySQL supports an extension for optionally specifying the display width of integer data types in parentheses following the base keyword for the type. For example, INT(4) specifies an INT with a display width of four digits. This optional display width may be used by applications to display integer values having a width less than the width specified for the column by left-padding them with spaces. (That is, this width is present in the metadata returned with result sets. Whether it is used or not is up to the application.)
The display width does not constrain the range of values that can be stored in the column. Nor does it prevent values wider than the column display width from being displayed correctly. For example, a column specified as SMALLINT(3) has the usual SMALLINT range of -32768 to 32767, and values outside the range permitted by three digits are displayed in full using more than three digits.

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

1.先進到MySql的設定檔

vi /etc/my.cnf

2.在mysqld這一區增加以下敘述(另一區是mysql-safe)

log=/var/log/mysql.general.log(儲存位置隨個人喜好)

3.存檔

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

1 2 3 4 5
Blog Stats
⚠️

成人內容提醒

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

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