Find file
Fetching contributors…
Cannot retrieve contributors at this time
180 lines (125 sloc) 8.83 KB
<!DOCTYPE html>
<html lang="zh">
<head>
<title>dokuwiki修改缓存文件位置</title>
<meta charset="utf-8" />
<link href="http://dqw.github.io/feeds/all.atom.xml" type="application/atom+xml" rel="alternate" title="DQW's Blog Full Atom Feed" />
<!-- Mobile viewport optimized: j.mp/bplateviewport -->
<meta name="viewport" content="width=device-width,initial-scale=1, maximum-scale=1">
<link rel="stylesheet" type="text/css" href="http://dqw.github.io/theme/gumby.css" />
<link rel="stylesheet" type="text/css" href="http://dqw.github.io/theme/style.css" />
<link rel="stylesheet" type="text/css" href="http://dqw.github.io/theme/pygment.css" />
<script src="http://dqw.github.io/theme/js/libs/modernizr-2.6.2.min.js"></script>
</head>
<body id="index" class="home">
<div class="container">
<div class="row">
<header id="banner" class="body">
<h1><a href="http://dqw.github.io">DQW's Blog <strong>用适合的技术解决实际的问题</strong></a></h1>
</header><!-- /#banner -->
<div id="navigation" class="navbar row">
<a href="#" gumby-trigger="#navigation &gt; ul" class="toggle"><i class="icon-menu"></i></a>
<ul class="columns">
<li><a href="http://dqw.github.io">Home</a></li>
<li><a href="http://dqw.github.io/pages/about.html">About</a></li>
</ul>
</div>
<section id="content" class="body">
<div class="row">
<div class="eleven columns">
<header>
<h2 class="entry-title">
<a href="http://dqw.github.io/dokuwikixiu-gai-huan-cun-wen-jian-wei-zhi.html" rel="bookmark"
title="Permalink to dokuwiki修改缓存文件位置">dokuwiki修改缓存文件位置</a></h2>
</header>
<footer class="post-info">
<abbr class="published" title="2012-04-09T22:53:00+08:00">
Mon 09 April 2012
</abbr>
<address class="vcard author">
By <a class="url fn" href="http://dqw.github.io/author/dqw.html">dqw</a>
</address>
</footer><!-- /.post-info -->
<div class="entry-content">
<p>用网盘同步时可以减少同步的文件,在conf下新建local.protected.php</p>
<div class="highlight"><pre><span class="cp">&lt;?php</span>
<span class="k">if</span><span class="p">(</span><span class="k">empty</span><span class="p">(</span><span class="nv">$_ENV</span><span class="p">[</span><span class="s1">&#39;TEMP&#39;</span><span class="p">]))</span> <span class="p">{</span>
<span class="nv">$conf</span><span class="p">[</span><span class="s1">&#39;cachedir&#39;</span><span class="p">]</span> <span class="o">=</span> <span class="s1">&#39;/tmp/dokuwiki/cache&#39;</span><span class="p">;</span>
<span class="nv">$conf</span><span class="p">[</span><span class="s1">&#39;tmpdir&#39;</span><span class="p">]</span> <span class="o">=</span> <span class="s1">&#39;/tmp/dokuwiki/tmp&#39;</span><span class="p">;</span>
<span class="nv">$conf</span><span class="p">[</span><span class="s1">&#39;lockdir&#39;</span><span class="p">]</span> <span class="o">=</span> <span class="s1">&#39;/tmp/dokuwiki/locks&#39;</span><span class="p">;</span>
<span class="o">@</span><span class="nb">mkdir</span><span class="p">(</span><span class="s1">&#39;/tmp/dokuwiki&#39;</span><span class="p">);</span>
<span class="o">@</span><span class="nb">mkdir</span><span class="p">(</span><span class="nv">$conf</span><span class="p">[</span><span class="s1">&#39;cachedir&#39;</span><span class="p">]);</span>
<span class="o">@</span><span class="nb">mkdir</span><span class="p">(</span><span class="nv">$conf</span><span class="p">[</span><span class="s1">&#39;tmpdir&#39;</span><span class="p">]);</span>
<span class="o">@</span><span class="nb">mkdir</span><span class="p">(</span><span class="nv">$conf</span><span class="p">[</span><span class="s1">&#39;lockdir&#39;</span><span class="p">]);</span>
<span class="p">}</span> <span class="k">else</span> <span class="p">{</span>
<span class="nv">$conf</span><span class="p">[</span><span class="s1">&#39;cachedir&#39;</span><span class="p">]</span> <span class="o">=</span> <span class="nv">$_ENV</span><span class="p">[</span><span class="s1">&#39;TEMP&#39;</span><span class="p">]</span><span class="o">.</span><span class="s1">&#39;/dokuwiki/cache&#39;</span><span class="p">;</span>
<span class="nv">$conf</span><span class="p">[</span><span class="s1">&#39;tmpdir&#39;</span><span class="p">]</span> <span class="o">=</span> <span class="nv">$_ENV</span><span class="p">[</span><span class="s1">&#39;TEMP&#39;</span><span class="p">]</span><span class="o">.</span><span class="s1">&#39;/dokuwiki/tmp&#39;</span><span class="p">;</span>
<span class="nv">$conf</span><span class="p">[</span><span class="s1">&#39;lockdir&#39;</span><span class="p">]</span> <span class="o">=</span> <span class="nv">$_ENV</span><span class="p">[</span><span class="s1">&#39;TEMP&#39;</span><span class="p">]</span><span class="o">.</span><span class="s1">&#39;/dokuwiki/locks&#39;</span><span class="p">;</span>
<span class="o">@</span><span class="nb">mkdir</span><span class="p">(</span><span class="nv">$_ENV</span><span class="p">[</span><span class="s1">&#39;TEMP&#39;</span><span class="p">]</span><span class="o">.</span><span class="s1">&#39;/dokuwiki&#39;</span><span class="p">);</span>
<span class="o">@</span><span class="nb">mkdir</span><span class="p">(</span><span class="nv">$conf</span><span class="p">[</span><span class="s1">&#39;cachedir&#39;</span><span class="p">]);</span>
<span class="o">@</span><span class="nb">mkdir</span><span class="p">(</span><span class="nv">$conf</span><span class="p">[</span><span class="s1">&#39;tmpdir&#39;</span><span class="p">]);</span>
<span class="o">@</span><span class="nb">mkdir</span><span class="p">(</span><span class="nv">$conf</span><span class="p">[</span><span class="s1">&#39;lockdir&#39;</span><span class="p">]);</span>
<span class="p">}</span>
</pre></div>
</div><!-- /.entry-content -->
</div><!-- /.eleven.columns -->
<div class="three columns">
<h4>Pages</h4>
<ul>
<li><a href="http://dqw.github.io/pages/about.html">About</a></li>
</ul>
<h4>Categories</h4>
<ul>
<li><a href="http://dqw.github.io/category/apache.html">apache</a></li>
<li><a href="http://dqw.github.io/category/centos.html">centos</a></li>
<li><a href="http://dqw.github.io/category/dokuwiki.html">dokuwiki</a></li>
<li><a href="http://dqw.github.io/category/javascript.html">javascript</a></li>
<li><a href="http://dqw.github.io/category/linux.html">Linux</a></li>
<li><a href="http://dqw.github.io/category/macos.html">macos</a></li>
<li><a href="http://dqw.github.io/category/mysql.html">mysql</a></li>
<li><a href="http://dqw.github.io/category/other.html">other</a></li>
<li><a href="http://dqw.github.io/category/pelican.html">pelican</a></li>
<li><a href="http://dqw.github.io/category/php.html">php</a></li>
<li><a href="http://dqw.github.io/category/xie-yi.html">协议</a></li>
</ul>
<h4>Tags</h4>
<ul>
</ul>
<nav class="widget">
<h4>LINKS</h4>
<ul>
<li><a href="feeds/all.atom.xml" target="_blank">RSS</a></li>
<li><a href="https://github.com/dqw" target="_blank">github</a></li>
<li><a href="http://www.douban.com/people/47947350/" target="_blank">douban</a></li>
<li><a href="http://dqw3721.blog.51cto.com/" target="_blank">以前51cto上的Blog</a></li>
<li><a href="http://dqw3721.cnblogs.com/" target="_blank">以前cnblogs上的Blog</a></li>
<li><a href="http://www.dqw.me/sitemap.xml" target="_blank">sitemap</a></li>
</ul>
</nav>
</div> </div><!-- /.row -->
</section>
</div><!-- /.row -->
</div><!-- /.container -->
<div class="container.nopad bg">
<footer id="credits" class="row">
<div class="seven columns left-center">
<address id="about" class="vcard body">
Proudly powered by <a href="http://getpelican.com/">Pelican</a>,
which takes great advantage of <a href="http://python.org">Python</a>.
<br />
Based on the <a target="_blank" href="http://gumbyframework.com">Gumby Framework</a>
</address>
</div>
<div class="seven columns">
<div class="row">
<ul class="socbtns">
</ul>
</div>
</div>
</footer>
</div>
<script src="http://dqw.github.io/theme/js/libs/jquery-1.9.1.min.js"></script>
<script src="http://dqw.github.io/theme/js/libs/gumby.min.js"></script>
<script src="http://dqw.github.io/theme/js/plugins.js"></script>
</body>
</html>