最近遇到不同伺服器中傳值的問題
主要用curl和ssh2
但ssh2大部分的主機都不預設支援
所以還是得用curl
result945 發表在 痞客邦 留言(0) 人氣(276)
$ary_phase = array("\r\n","\r"," ","\n");
$data['question'] = str_replace($ary_phase,"",$this->input->post('question'));
result945 發表在 痞客邦 留言(0) 人氣(2,897)
網頁嵌入語音、除了使用youtube嵌入外
另外有JarisFLVPlayer
jwplayer及flowplayer
都算蠻好用的,google一下就有使用教學了!!
result945 發表在 痞客邦 留言(0) 人氣(136)
最近要幫伺服器定期備份MySQL
首先、先把原本的資料庫全部備份起來
mysqldump --user=root -p --all-database > /backup/mysql.sql
result945 發表在 痞客邦 留言(0) 人氣(1,143)
最近看到朋友用聽電影和看字幕來練習英文
所以就也想來學習他的方法
但字幕檔裡還有時間、因此就想把不需要的時間濾掉
<?php
$fn = "test.srt";//字慕檔名稱
$fp = fopen($fn, 'r'); //讀取字幕檔
while(!feof($fp)){
$line = fgets($fp);//讀取每一行
if(!ereg("^[0-9]", $line)) //如果開頭不是數字則顯示
echo $line . '<br/>';
}
?>
result945 發表在 痞客邦 留言(1) 人氣(381)
1.#yum groupinfo “mysql” //查詢mysql會安裝那些套件
2.#yum groupinstall “mysql” //使用yum進行群組安裝
Ps.如果想將mysql DB放置資料夾從預設的/var/lib/mysql改放到別的目錄的話
ex./home/db/mysql。
#mkdir /home/db; mkdir /home/db/mysql
#chown mysql:mysql /home/db/mysql
#vim /etc /my.cnf
result945 發表在 痞客邦 留言(0) 人氣(1,497)
今天在練習WP更換佈景主題時出現了
Warning: Cannot modify header information - headers already sent
by (output started at
J:\AppServ\www\wordpress\wp-content\themes\wpnote\functions.php:1) in J:\AppServ\www\wordpress\wp-includes\functions.php on line 830
Warning: Cannot modify header information - headers already sent
by (output started at
J:\AppServ\www\wordpress\wp-content\themes\wpnote\functions.php:1) in J:\AppServ\www\wordpress\wp-includes\functions.php on line 831
result945 發表在 痞客邦 留言(0) 人氣(1,046)
<?php
$this->load->model('epaper_model');
$this->load->helper('form_helper');
$this->load->library('email');
$mail_html = $this->load->view('theme_ocbn/forget_pass_email.php', array('data' => $data), TRUE);
$config['protocol'] = 'smtp';
$config['smtp_host'] = 'ssl://smtp.gmail.com';
$config['smtp_port'] = '465';
$config['smtp_user'] = 'your@gmail.com';
$config['smtp_pass'] = 'yourpass';
$config['mailtype'] = 'html';
$config['newline'] = "\r\n";
$config['crlf'] = "\r\n";
$config['charset'] = 'gbk';
$this->email->initialize($config);
$this->email->from('your@gmail.com', iconv('utf-8', 'gbk', 'sendername'));
$this->email->to($row->email);
$this->email->subject(iconv('utf-8', 'gbk', $subject));
$this->email->message(iconv('utf-8', 'gbk', $mail_html));
$this->email->send();
?>
result945 發表在 痞客邦 留言(0) 人氣(607)
這篇文章在KM上已經有三百多篇迴響了、雖然都是外國人、不過都回的很認真、真的很感謝他讓我有繼續寫的動力。果然寫程式是不分國界的
最近Mandarin的Daily Word想學華文網每天輪播一個字
可是...這是我沒遇過的問題~其實華文網首頁的廣告好像有輪播的方法、
但是cache->再用linux的cron我不會、而且好像還是有些小問題
再想了一陣子的結果、首先我認為
result945 發表在 痞客邦 留言(0) 人氣(231)
主要是參考這篇blog
1.一般都是使用.htaccess
首先要設定http.conf
result945 發表在 痞客邦 留言(0) 人氣(960)