<?xml version="1.0" encoding="utf-8"?>
<?xml-stylesheet href="http://120.112.17.17/blog/styles/rss.css" type="text/css"?>
<rss version="0.91">

 <channel>
  <title>豬窩</title>
  <link>http://120.112.17.17/blog/shyong</link>
  <description> 小豬的備忘錄,對錯完全不負責 
</description>
    <item>
   <title>Barcode/NFC/OCR Scanner Keyboard 手機網頁輸入掃瞄</title>
   <description> 
Barcode/NFC/OCR Scanner Keyboard 手機網頁輸入掃瞄
 
 
也就是用手機登入網頁,在文字輸入欄位可以用手機掃瞄條碼的功能 
 </description>
   <link>http://120.112.17.17/blog/shyong/archives/598</link>
      <pubDate>Sun, 11 Apr 2021 17:24:44 +0800</pubDate>   
  </item>
    <item>
   <title>新重修科目多年級學期設定</title>
   <description> 
範例檔: 108.xls 
 
說明檔: subject.docx </description>
   <link>http://120.112.17.17/blog/shyong/archives/595</link>
      <pubDate>Tue, 25 Aug 2020 10:45:17 +0800</pubDate>   
  </item>
    <item>
   <title>centos7 與  openwebmail 版本</title>
   <description> 
在升級為 centos7 後 openwebmail 2.53 版就無法使用,而網上說的 3.0 beta 版,在使用時有通訊錄無法增加修改的問題,還有某些網站寄來的信件,附件檔無法開啟,及無法轉寄的問題,一直無法解決,後來看到為了CentOS7出的 2.54 版,想說裝裝看,結果竟然解決了上面無法開啟及通訊錄的問題,參考某些網站安裝 3.0 的方式,修改一些符合自己的方式,方法如下:

 
 
	 vi /etc/selinux/config (改為disabled)  
	 cd /etc/yum.repos.d/ ; wget ftp://openwebmail.org/pub/openwebmail/el7/openwebmail-el7.repo 
	 yum --downloadonly --downloaddir=/usr/local/src install openwebmail perl-CGI-SpeedyCGI perl-Authen-PAM perl-HTML-Template 
	 cd /usr/local/src/ ; rpm -Uvh *.rpm (再來安裝其它相關套件) 
	 yum install openwebmail ( 直接安裝 2.54 版本) 
	 mv /var/www/data/openwebmail /var/www/html (將網頁直接移到 html 下) 
	 cp /usr/bin/speedy /usr/bin/speedy_suidperl ; chmod 4555 /usr/bin/speedy_suidperl 
	 cd /var/www/cgi-bin/openwebmail&nbsp; (到 openwebmail目錄) 
	 sed -i -e 's/perl -T/speedy_suidperl -T -- -T\/tmp\/speedy/' openwebmail*.pl# vi etc/openwebmail.conf (因為上面將套件目錄作修改) 
	  vi etc/openwebmail.conf 
	domainnames&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; www.fhsh.tp.edu.tw 
	&nbsp;auth_module&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; auth_pam.pl 
	mailspooldir&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; &nbsp; /var/spool/mail&nbsp; 
	ow_cgiurl&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; /cgi-bin/openwebmail 
	ow_htmldir&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; /var/www/html/openwebmail 
	ow_htmlurl&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; /openwebmail 
	logfile&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; /var/log/openwebmail.log (以下不改)(以下不改) 
	 vi etc/dbm.conf 
	dbm_ext&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .pag 
	dbmopen_ext&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; none 
	dbmopen_haslock&nbsp;&nbsp;&nbsp;&nbsp; no 
	 ./openwebmail-tool.pl --init&nbsp; (到這裡差不多結束,但有些權限必須改如下) 
	 設定OpenWebMail幾個目錄內幾個pl檔案設定權限為777，再將wrapsuid.pl設為660，此權限千萬一定要設定，否則會無法開啟OpenWebMail登入畫面。 
	# chmod 777 ./misc/tools/wrapsuid/wrapsuid.pl ./misc/tools/wrapsuid/wrapsuid.pl /var/www/cgi-bin/openwebmail/openwebmail*.pl 
	 
	# chmod 660 ./misc/tools/wrapsuid/wrapsuid.pl 
	 
	將OpenWebMail主程式目錄下的pl檔案權限皆設定為4755，不要懷疑就是4755 
	# chmod 4755 openwebmail*.pl 
	 
	建立OpenWebMail的紀錄檔，並設定記錄檔權限。 
	# touch /var/log/openwebmail.log 
	# chown root.mail /var/log/openwebmail.log 
	 
	設定登入session目錄的權限為777 
	# chmod -R 777 /var/www/cgi-bin/openwebmail/etc/sessions/ 
 
 
參考自: http://www.wkb.idv.tw/moodle/mod/page/view.php?id=7831&amp;lang=zh_tw
 </description>
   <link>http://120.112.17.17/blog/shyong/archives/568</link>
      <pubDate>Sun, 10 Sep 2017 02:11:23 +0800</pubDate>   
  </item>
    <item>
   <title>Apach 網頁目錄瀏灠用 UTF-8 編碼</title>
   <description>網頁上為了讓網頁可以瀏灠目錄檔案都是在 &lt;Directory /var/www/html/XXX&gt; 中加入 Options Indexes 這樣只要沒有 index.* 檔,就會列出所有目錄中檔案名稱,可是如果沒有限定 UTF-8 編碼就會秀出亂碼 , 網上找到在 Options Indexes 下一行加入 IndexOptions Charset=UTF-8 NameWidth=128 就可以了,找到更方便的 NameWidth 設定,數字是 n byte , 可以改用 * 表示自動滿足檔名長度 , 所以改成 NameWidth=*</description>
   <link>http://120.112.17.17/blog/shyong/archives/566</link>
      <pubDate>Thu, 07 Sep 2017 10:53:35 +0800</pubDate>   
  </item>
    <item>
   <title>讓 IIS 可以開啟開放格式檔</title>
   <description> 
讓 IIS 可以開啟 open office 檔案,因為 IIS 不認識這些格式,所以只要在 MIME 增加這些類型
 
 
[open office] 
 'odt' =&gt; 'application/vnd.oasis.opendocument.text', 
 'ods' =&gt; 'application/vnd.oasis.opendocument.spreadsheet', 
 'odp' =&gt; 'application/vnd.oasis.opendocument.presentation', 
&nbsp;
 
 
參照:http://sshes-mis.blogspot.tw/2013/04/mime.html
 </description>
   <link>http://120.112.17.17/blog/shyong/archives/548</link>
      <pubDate>Tue, 31 May 2016 20:24:53 +0800</pubDate>   
  </item>
    <item>
   <title>win2008 dc , ipv6 ,賽門鐵克</title>
   <description>因為要支援 ipv6 , 所以將學校的網頁伺服器從 win2000 升級到 win2008 ,要將伺服器加入網域時,顯示名稱錯誤無法加入,後來查看是 .1 , .3 兩台 dc 沒有同步,查找了 google ,一直沒用,後來想到 ipv6 ping 它台主機不通,所以想說是否防火牆,將它關掉也不行,後來發現主機有裝賽門鐵克,將它一關,一切正常,有空上 google 查查,到底擋了什麼</description>
   <link>http://120.112.17.17/blog/shyong/archives/511</link>
      <pubDate>Wed, 15 Oct 2014 15:27:49 +0800</pubDate>   
  </item>
    <item>
   <title>網頁改黑白(灰階)</title>
   <description> 
網頁改灰階(for IE,Chrome,Firefox)加入 
 
 
 &lt;style type=&quot;text/css&quot;&gt; 
&lt;!-- 
body *{filter:gray;} 
html{ 
filter:progid:DXImageTransform.Microsoft.BasicImage(grayscale=1); 
-webkit-filter: grayscale(100%); 
-moz-filter: grayscale(100%); 
-ms-filter: grayscale(100%); 
-o-filter: grayscale(100%); 
filter: url(&quot;data:image/svg+xml;utf8,&lt;svg xmlns=\'http://www.w3.org/2000/svg\'&gt;&lt;filter id=\'grayscale\'&gt;&lt;feColorMatrix type=\'matrix\' values=\'0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0 0 0 1 0\'/&gt;&lt;/filter&gt;&lt;/svg&gt;#grayscale&quot;);  
/* Firefox 10+, Firefox on Android */ 
} 
--&gt; 
&lt;/style&gt; 
  
flash swf 改灰階(for IE,Chrome)加入 
 
 &lt;param value=&quot;false&quot; name=&quot;menu&quot; /&gt; 
&lt;param value=&quot;opaque&quot; name=&quot;wmode&quot; /&gt;  
 
flash swf 改灰階(for Firefox)加入 
 
&lt;object type=&quot;application/x-shockwave-flash&quot; data=&quot;xxx.swf&quot; width=&quot;xxx&quot; height=&quot;xx&quot;  wmode=&quot;opaque&quot; menu=&quot;false&quot;  &gt;  
 
&nbsp;&nbsp;
 </description>
   <link>http://120.112.17.17/blog/shyong/archives/509</link>
      <pubDate>Sun, 03 Aug 2014 21:11:30 +0800</pubDate>   
  </item>
    <item>
   <title>PHP utf-8 用 header 檔案下載 word error</title>
   <description> 
以前在 big5 網頁用 
 
 
header(&quot;Content-Type: application/force-download; name=\&quot;&quot;.$file.&quot;\&quot;&quot;); //==&gt; 當你存檔的時候正確顯示你的檔名 
header(&quot;Content-Disposition: attachment; filename=\&quot;&quot;.$file.&quot;\&quot;&quot;); //==&gt; 當你存檔的時候正確顯示你的檔名 
header(&quot;Content-Transfer-Encoding: binary&quot;); 
readfile($df); 
 
 
可以下載 word 或 pdf 的檔案
 
 
可是改成 utf-8&nbsp; 網頁時,下載 word 檔案就顯示無法啟動轉換程式,在網頁上找到有人說是 buffer 的問題,後來看到有人加入清 buffer 的函數,竟然就可以了,將指令修改如下
 
 
header(&quot;Content-Type: application/force-download; name=\&quot;&quot;.$file.&quot;\&quot;&quot;); //==&gt; 當你存檔的時候正確顯示你的檔名 
header(&quot;Content-Disposition: attachment; filename=\&quot;&quot;.$file.&quot;\&quot;&quot;); //==&gt; 當你存檔的時候正確顯示你的檔名 
header(&quot;Content-Transfer-Encoding: binary&quot;); 
 ob_clean(); 
flush();  
readfile($df); 
 
 
&nbsp;
 </description>
   <link>http://120.112.17.17/blog/shyong/archives/481</link>
      <pubDate>Fri, 08 Mar 2013 23:30:32 +0800</pubDate>   
  </item>
    <item>
   <title>ie ,firefox 在 form 表單按 Enter 的差別 (用條碼機的問題)</title>
   <description> 
今天在用條碼機讀取後送出表單,結果在 IE 網頁一直有問題,而在 firefox 及 Chrome 都沒有問題,查找的結果,才知道,原來用條碼讀取時,會直接送出 Enter,做送出表單的動作,因為我有用 submit 的 value 值,判斷新增或刪除的動作.
 
 
測試的結果,在 IE 用 Enter 送出表單,是不會將 submit 的值送出,所以判斷一直出錯,而 firefox,Chrome 用 Enter 送出表單,是會將 submit 的值送出,所以就沒有問題.
 
 
解決方法:不要用 submit 值判斷,而是增加一個 &lt;input type='hidden' ....&gt;做為判別. 
 </description>
   <link>http://120.112.17.17/blog/shyong/archives/465</link>
      <pubDate>Wed, 18 Apr 2012 16:58:17 +0800</pubDate>   
  </item>
    <item>
   <title>javascript 的 location.href  或  asp 的 Response.Redirect 的 target</title>
   <description>今天在修改一支 Asp 程序時,在表單返回時,在 IE 可正常返回所在 Frame ,而 Firefox 卻會開一新網頁,不會返回原 Frame,後來發現在該網頁的 &lt;head&gt; 宣告中,有宣告 &lt;base target=&quot;Content&quot;&gt; , 而該網頁所在 Frame 並不叫  Content , 所以只要將 target 的返回 Frame 名改對,或是將該行砍掉,就可以正常返回</description>
   <link>http://120.112.17.17/blog/shyong/archives/415</link>
      <pubDate>Wed, 18 Aug 2010 16:38:54 +0800</pubDate>   
  </item>
   </channel>
</rss>

