<?xml version="1.0" encoding="UTF-8" ?>
<rss version="2.0">
<channel>
<title><![CDATA[A.PAO designSTUDIO BLOG]]></title> 
<link>https://blog.apao.idv.tw/index.php</link> 
<description><![CDATA[A.PAO designSTUDIO 阿保工作室]]></description> 
<language>zh-tw</language> 
<copyright><![CDATA[A.PAO designSTUDIO BLOG]]></copyright>
<item>
<link>https://blog.apao.idv.tw/post//</link>
<title><![CDATA[使用 htaccess 快速於網頁 Header/Footer 插入特定程式]]></title> 
<author>apao &lt;apao@www.apao.idv.tw&gt;</author>
<category><![CDATA[Apache]]></category>
<pubDate>Sat, 22 Oct 2011 01:28:14 +0000</pubDate> 
<guid>https://blog.apao.idv.tw/post//</guid> 
<description>
<![CDATA[ 
	當看到一卡車的檔案, 每個檔案都要進去裡面加個 include 或某些資料, 想到就很辛苦~<br/><br/>另一種做法就是用 .htaccess 並用 php 的功能, 就可以快速達到這點~<br/><br/>.htaccess 是對整個目錄以下的做動作, 所以下述參數會對此目錄的所有檔案都加上 header.php<br/><br/><strong>php_value auto_prepend_file / auto_append_file 設定</strong><br/><br/># 在每個檔案的最上方(前方), 都把 header.php 的內容插入<br/>php_value auto_prepend_file "header.php" <br/><br/><a href="https://blog.apao.idv.tw/attachment.php?fid=1255" target="_blank"><img src="https://blog.apao.idv.tw/attachment.php?fid=1255" class="insertimage" alt="點擊在新視窗中瀏覽此圖片" title="點擊在新視窗中瀏覽此圖片" border="0" width="540"/></a><br/><br/>範例：<br/><a href="http://apao.zapto.org/~apao/Apache/addheader/index.php" target="_blank">http://apao.zapto.org/~apao/Apache/addheader/index.php</a><br/><br/><strong>說明：</strong><br/><br/><span style="color: #32CD32;"><strong>上方</strong></span><br/>php_value auto_prepend_file "header.inc"<br/>方式強制夾進index.php html碼的上方。<br/><span style="color: #32CD32;"><br/><strong>中間</strong></span><br/>原本的body部份<br/><br/><span style="color: #32CD32;"><strong>下方</strong></span><br/>&lt;?php include(&quot;footer.php&quot;); ?&gt;<br/>方式，將[footer.php]置入index.php<br/><br/>本地登入下載[htaccess.txt]<br/>htaccess檔案這個檔案只能在登入之後下載。請先 <a href="https://blog.apao.idv.tw/login.php?job=register">註冊</a> 或 <a href="https://blog.apao.idv.tw/login.php">登入</a><br/>php_value auto_prepend_file "header.php"<br/><br/>本地登入完整下載 [addheader.zip]<br/>這個檔案只能在登入之後下載。請先 <a href="https://blog.apao.idv.tw/login.php?job=register">註冊</a> 或 <a href="https://blog.apao.idv.tw/login.php">登入</a><br/><br/>在DSM舊版本中是支援這樣的寫法 現在Synolgoy DSM 5.1-5022 這種寫法無法動作<br/><div style="border:#963 dotted 1px;"><a href="https://blog.apao.idv.tw/attachment.php?fid=2072" target="_blank"><img src="https://blog.apao.idv.tw/attachment.php?fid=2072" class="insertimage" alt="點擊在新視窗中瀏覽此圖片" title="點擊在新視窗中瀏覽此圖片" border="0"/></a></div><br/><br/><hr>於是我又參考一下國外的寫法看看<br/><br/>header.php 檔案連結<br/><a href="http://apao.zapto.org/~apao/Apache/addfooter/header.php" target="_blank">http://apao.zapto.org/~apao/Apache/addfooter/header.php</a><br/><br/>footer 檔案連結<br/><a href="http://apao.zapto.org/~apao/Apache/addfooter/footer.php" target="_blank">http://apao.zapto.org/~apao/Apache/addfooter/footer.php</a><br/><br/># 在每個檔案的最下方(後方), 都把 footer.php 的內容插入<br/>php_value auto_append_file "/home/www/Apache/addfooter/footer.php"<br/><br/>檔案夾檔案下載：<br/>這個檔案只能在登入之後下載。請先 <a href="https://blog.apao.idv.tw/login.php?job=register">註冊</a> 或 <a href="https://blog.apao.idv.tw/login.php">登入</a><br/><br/>參考網站 對方寫法：<br/><span style="font-size: 130%;"><strong>PHPで翻訳三昧</strong></span><br/><a href="http://beatnik.jp/blog/archives/249" target="_blank">http://beatnik.jp/blog/archives/249</a><br/>php_value auto_prepend_file "/home/userdir/spamFilter.php"<br/><br/><span style="font-size: 130%;"><strong>ハチログ</strong></span><br/>參考網站 對方寫法：<br/><a href="http://www.hachi-log.com/prepend-append/" target="_blank">http://www.hachi-log.com/prepend-append/</a><br/>php_value auto_prepend_file /dir/dir/file-prepend.php<br/><br/>php.ini 檔案 需要另外加入...<br/>#auto_prepend_file メインファイルの前に実行する<br/>auto_prepend_file = /dir/dir/file-prepend.php<br/> <br/>#auto_append_file メインファイルの後に実行する<br/>auto_append_file = /dir/dir/file-append.php<br/><br/><span style="font-size: 130%;"><strong>找了Apache官網</strong></span><br/><a href="http://httpd.apache.org/docs/2.4/ja/" target="_blank">http://httpd.apache.org/docs/2.4/ja/</a><br/><br/><span style="font-size: 130%;"><strong>Google搜尋結果</strong></span>似乎沒有針對這無法執行做說明或是追申敘述的內容<br/>Search: apache 2.4 auto_append_file<br/><br/>在Synology官網上的資料<br/><a href="https://www.synology.com/zh-tw/knowledgebase/faq/310" target="_blank">https://www.synology.com/zh-tw/knowledgebase/faq/310</a><br/>DSM 版本&nbsp;&nbsp; PHP&nbsp;&nbsp; MySQL/MariaDB&nbsp;&nbsp; Apache<br/>DSM 5.0&nbsp;&nbsp; 5.5&nbsp;&nbsp; 5.5&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 2.2(Unix)<br/>DSM 4.3&nbsp;&nbsp; 5.3.28&nbsp;&nbsp; 5.1.49&nbsp;&nbsp; 2.2(Unix)<br/>Tags - <a href="https://blog.apao.idv.tw/tags/%25E4%25BD%25BF%25E7%2594%25A8/" rel="tag">使用</a> , <a href="https://blog.apao.idv.tw/tags/apache/" rel="tag">apache</a> , <a href="https://blog.apao.idv.tw/tags/htaccess/" rel="tag">htaccess</a> , <a href="https://blog.apao.idv.tw/tags/%25E5%25BF%25AB%25E9%2580%259F%25E6%2596%25BC%25E7%25B6%25B2%25E9%25A0%2581/" rel="tag">快速於網頁</a> , <a href="https://blog.apao.idv.tw/tags/header/" rel="tag">header</a> , <a href="https://blog.apao.idv.tw/tags/footer/" rel="tag">footer</a> , <a href="https://blog.apao.idv.tw/tags/%25E6%258F%2592%25E5%2585%25A5%25E7%2589%25B9%25E5%25AE%259A%25E7%25A8%258B%25E5%25BC%258F/" rel="tag">插入特定程式</a>
]]>
</description>
</item><item>
<link>https://blog.apao.idv.tw/post//#blogcomment</link>
<title><![CDATA[[評論] 使用 htaccess 快速於網頁 Header/Footer 插入特定程式]]></title> 
<author> &lt;user@domain.com&gt;</author>
<category><![CDATA[評論]]></category>
<pubDate>Thu, 01 Jan 1970 00:00:00 +0000</pubDate> 
<guid>https://blog.apao.idv.tw/post//#blogcomment</guid> 
<description>
<![CDATA[ 
	
]]>
</description>
</item>
</channel>
</rss>