Organizing uploads in year/month format
<p>I need a little help. Im a newbie. I'm trying to create a php script for uploading files. Currently I'm using a static/fixed location for uploading. But I want to organize them according to year/ month folders. just like wordpress. here is the code I'm using</p>

<pre><code>$config['baseurl']  =  'http://mysite.com';
$config['path'] = $config['basedir'].'/uploads';
</code></pre>

<p><strong>currently image path looks like:</strong> <a href="http://mysite.com/uploads/image.jpg" rel="nofollow">http://mysite.com/uploads/image.jpg</a></p>

<p><strong>but I want:</strong> <a href="http://mysite.com/uploads/2012/07/image.jpg" rel="nofollow">http://mysite.com/uploads/2012/07/image.jpg</a></p>

<p>I'll very appreciate if someone make me a little php code. Thanks</p>
