<?xml version="1.0" encoding="utf-8"?>
<feed xml:lang="en" xmlns="http://www.w3.org/2005/Atom"><title>Recent changes to bugs</title><link href="https://sourceforge.net/p/simplephpweb/bugs/" rel="alternate"/><link href="https://sourceforge.net/p/simplephpweb/bugs/feed.atom" rel="self"/><id>https://sourceforge.net/p/simplephpweb/bugs/</id><updated>2003-09-30T17:56:53Z</updated><subtitle>Recent changes to bugs</subtitle><entry><title>Remnant .tmp files</title><link href="https://sourceforge.net/p/simplephpweb/bugs/1/" rel="alternate"/><published>2003-09-30T17:56:53Z</published><updated>2003-09-30T17:56:53Z</updated><author><name>Dan Szymkowiak</name><uri>https://sourceforge.net/u/slippychicken/</uri></author><id>https://sourceforge.netcd58308d0f6a03e5025de560939da640f0b56cd8</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;If you try edit a file, then navigate away from the&lt;br /&gt;
page without saving it, then the .tmp stays. However,&lt;br /&gt;
the tmp file is blank as a result, so when you go back&lt;br /&gt;
to edit the file, it's blank. I included a link on the&lt;br /&gt;
left of the site linking to a page with this code to&lt;br /&gt;
flush the .tmp files from the &amp;amp;quot;content&amp;amp;quot; directory.&lt;/p&gt;
&lt;p&gt;##################################&lt;/p&gt;
&lt;p&gt;// $d is the tmp directory handle&lt;br /&gt;
$d = opendir(&amp;amp;quot;../content/&amp;amp;quot;);&lt;br /&gt;
while (false !== ($file = readdir($d))) {&lt;br /&gt;
if (preg_match(&amp;amp;quot;/.tmp/&amp;amp;quot;, $file)) {  // search for the&lt;br /&gt;
.tmp extension&lt;br /&gt;
unlink(&amp;amp;quot;../content/&amp;amp;quot; . $file); // delete the .tmp file&lt;br /&gt;
}&lt;br /&gt;
}&lt;br /&gt;
closedir($d); // close the directory&lt;/p&gt;
&lt;p&gt;header(&amp;amp;quot;http://www.yoursite.com/simpledir&amp;amp;quot;); //&lt;br /&gt;
redirect back to the main page&lt;/p&gt;
&lt;p&gt;###################################&lt;/p&gt;
&lt;p&gt;Great work on the project though, keep it up!&lt;/p&gt;&lt;/div&gt;</summary></entry></feed>