Archive

Posts Tagged ‘file’

URI vs URN vs URL

Mar 13th, 2010

Do you know what does URI, URL and URN means? I bet you will say that I know about URL but what about URI and URN! Here is a good description on Wikipedia and that is enough to understand these three:
URI tells a unique path to a resource on the Internet. This image will give [...]

Handling File Read/write Concurrency Problem in PHP

Feb 23rd, 2010

Recently I need to use file for caching little bit of data. Then I thought of concurrency problem can arise in File based structure due to read/write issue. For small data and that also if  not so useful , usage of Database can be avoided. Though Database can handle any kind of conflict and other [...]

PHP: Getting File extension and file basename

Jan 31st, 2010

Here is a script for getting file extension. It will take care of the file name like this: yourfilename.inc.php etc and not only filename.inc or fileename.php. It will get your last part of file irrespective of how many dots in file.
<?php
// will get the file name out of whole path (path/to/file.inc.php)
$filename = basename($filePath);
// split it [...]

PHP require/include and relative path error

Jan 7th, 2010

Finding the correct relative path for use in you php page for include/require.

Getting all Parent Folders of a Folder and File

Dec 26th, 2009

I need to get all the parent folders of a File for a work. I searched on net to find easy solution for this and also to find some tips for my work. As, my work was heavily dependent on this logic, so I have given some time to it. But whatever I have found [...]

Unique Identification for file/ folder name, ID, table key, invoice/ order number

Jul 8th, 2007

We require unique identifier for dynamically created file, folder, invoice etc. This post is related to getting unique id for these kind of work.