Re: [SMARTY] Version Updates

From: Date: Fri, 07 Mar 2003 09:27:57 +0000
Subject: Re: [SMARTY] Version Updates
References: 1 2 3 4 5 6  Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-8474@lists.php.net to get a copy of this message
Well, it actually walks through the directory structure and deletes everthing beneath template_c and cache ;) Pete Morganic wrote:
Could this function be modified to "walk" the direcctory structure and find any template_c directories. I'd then be able to run a script after upgrading that would do the deleting for me on a site pete Martin Mandl wrote:
At 16:23 06.03.2003 +0100, you wrote:
Uh, bad news. Many ISP uses wwwrun.nogroup for the server. The compiled or cached files are owned by this user. So I am not able to remove them.
I've included the following script into my projects ... function delete($file) { chmod($file,0777); if (is_dir($file)) { $handle = opendir($file); while($filename = readdir($handle)) { if ($filename != "." && $filename != "..") { delete($file."/".$filename); } } closedir($handle); rmdir($file); } else { unlink($file); } } delete("templates_c"); delete("cache");


« previous php.smarty.general (#8474) next »