<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>how to store multiple files Архиви - rosen4o.net</title>
	<atom:link href="https://rosen4o.net/tag/how-to-store-multiple-files/feed/" rel="self" type="application/rss+xml" />
	<link>https://rosen4o.net/tag/how-to-store-multiple-files/</link>
	<description></description>
	<lastBuildDate>Fri, 29 Nov 2013 23:31:06 +0000</lastBuildDate>
	<language>bg-BG</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.9</generator>
	<item>
		<title>idea for id storing of files</title>
		<link>https://rosen4o.net/2013/11/30/idea-for-id-storing-of-files/</link>
					<comments>https://rosen4o.net/2013/11/30/idea-for-id-storing-of-files/#respond</comments>
		
		<dc:creator><![CDATA[rosen4o]]></dc:creator>
		<pubDate>Fri, 29 Nov 2013 23:31:06 +0000</pubDate>
				<category><![CDATA[linux]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[dir]]></category>
		<category><![CDATA[file storing]]></category>
		<category><![CDATA[how to store multiple files]]></category>
		<category><![CDATA[id storing]]></category>
		<category><![CDATA[multiple files in one dir]]></category>
		<category><![CDATA[separating files]]></category>
		<guid isPermaLink="false">http://rosen4o.net/?p=979</guid>

					<description><![CDATA[<p>If you have some time of id in your database and you want to save file associated with this id it&#8217;s not a good idea to make dir with id value and save the file there because on some point<span class="ellipsis">&#8230;</span></p>
<div class="read-more"><a href="https://rosen4o.net/2013/11/30/idea-for-id-storing-of-files/">Прочетете повече ›</a></div>
<p><!-- end of .read-more --></p>
<p>Материалът <a href="https://rosen4o.net/2013/11/30/idea-for-id-storing-of-files/">idea for id storing of files</a> е публикуван за пръв път на <a href="https://rosen4o.net">rosen4o.net</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>If you have some time of id in your database and you want to save file associated with this id it&#8217;s not a good idea to make dir with id value and save the file there because on some point you will have too much dirs with same name.</p>
<p>For this if the id is 123456 we can create dir from the id but separating all digit in subdir like 1/2/3/4/5/6/file/file.jpg</p>
<p>The last one dir is called file because we can have 1234567 and then in this dir we will have subdir 😉</p>
<p style="padding-left: 30px;">function gen_id_to_folder_name($id){</p>
<p style="padding-left: 30px;">$split = str_split($id);</p>
<p style="padding-left: 30px;">foreach($split as $spl){<br />
$folder_name .=$spl.&#8220;/&#8220;;<br />
}</p>
<p style="padding-left: 30px;">return $folder_name.&#8220;c/&#8220;;<br />
}</p>
<p>Материалът <a href="https://rosen4o.net/2013/11/30/idea-for-id-storing-of-files/">idea for id storing of files</a> е публикуван за пръв път на <a href="https://rosen4o.net">rosen4o.net</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://rosen4o.net/2013/11/30/idea-for-id-storing-of-files/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
