Joomal 1.5 中文安裝教學

2010年1月3日 阿捷 尚無評論

安裝中文環境準備
1.到官網下載最新 Joomla 主程式(本教學文章版本為1.5.15) 解壓縮至 Joomla 目錄

2.中文語系官網下載中文化檔案。
zh-TW.site.1.5.15.zip解壓縮至 Joomla/language/zh-TW/
zh-TW.administrator.1.5.15.zip解壓縮至 Joomla/administrato/language/zh-TW/

接下來上傳至你的主機,上傳完成後開始執行 http://你的網站/安裝目錄
01.選擇語系
02.系統檢查
03.授權規定
04.資料庫設定
05.FTP設定
06.Joomla網站設定

Categories: HTML, PHP, Uncategorized, 引用 Tags:

2010 新年快樂

2010年1月1日 阿捷 尚無評論

最近忙爆了2010 新年快樂

Categories: 引用 Tags:

PHP 寫入文件 file_put_contents

2009年11月17日 阿捷 尚無評論

在 PHP 版本 5.0.0 之前 file_put_contents 這個函數,必須使用fwrite寫法。

1
2
3
4
5
6
<?php
$fp = fopen("data.txt","w");  //必須要先用fopen開啟文件
$string = "Hello World";  //字串
fwrite($fp, $string);  //用fwrite寫入
fclose($fp);  //關閉檔案
?>


使用 file_put_contents

1
2
3
4
5
<?php
$fp="data.txt";
$string = "Hello World";  //字串
file_put_contents($fp, $string); 
?>


fwrite 寫入文件未端,只要把 $mode 參數 w 改成 a 就好。

1
2
3
4
5
6
<?php
$fp = fopen("data.txt","a");  //必須要先用fopen開啟文件
$string = "Hello World";  //字串
fwrite($fp, $string);  //用fwrite寫入
fclose($fp);  //關閉檔案
?>

由於 file_put_contents 沒有 $mode 參數可以設定,所以需要使用 file_get_contents 取得文件內容。

1
2
3
4
5
6
<?php
$fp="data.txt";
$string=file_get_contents($fp);   //先取出文件內容,轉成字串
$string.="Hello World";            //在字串最後加入新字串
file_put_contents($fp, $string);    //寫入文件
?>
Categories: PHP Tags: , ,

PHP 控制流程 goto

2009年11月8日 阿捷 1 則評論

PHP 5.3 新增的一個 goto 程式碼。
GOTO 也不是完全好用,詳見 wili 對於goto使用的批評
在 PHP 中 GOTO 限制不能跳進迴圈或switch 中。

1
2
3
4
5
6
7
8
9
<?php
goto loop;
for($i=0,$j=50; $i<100; $i++) {
  while($j--) {
    loop:
  }
}
echo "$i = $i";
?>

PHP官方附GOto
php goto

Categories: PHP Tags: ,

PHP 亂數密碼產生器

2009年10月22日 阿捷 尚無評論

每次想密碼很麻煩,後來就乾脆自己寫一段,實際上強式密碼我也不常用所以沒加入產生。

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
<?php
//亂數密碼產生器
function generatorPassword($pt=8,$myWord=""){
	$password="";
	$str="0123456789abcdefghijklmnopqrstuvwxyz";
	$str.=$myWord;
	$str_len=strlen($str);
for ($i=1;$i<=$pt;$i++){	
		$rg=rand()%$str_len;
		$password.=$str{$rg};
	}
return $password;
}
//避開強式密碼 < 在html消失
//header("Content-Type: text;"); 
 
 
echo generatorPassword();
 
/*
預設八個字元,設定10個字元
generatorPassword(10,<);
*/
?>
Categories: PHP Tags: , , ,

Adobe Dreamweaver 線上手冊

2009年10月20日 阿捷 尚無評論

Adobe 官方有提供線上說明文件內容相當豐富
Adobe Dreamweaver CS3
Adobe Dreamweaver CS4
官方 Adobe Dreamweaver CS4 還有 PDF 檔案下載
下載 Adobe Dreamweaver CS4 PDF 文件

Categories: 網頁設計纇 Tags: , , ,

Hello world!

2009年10月19日 admin 尚無評論

Welcome to WordPress. This is your first post. Edit or delete it, then start blogging!

Categories: Uncategorized Tags: