note 93909 rejected from language.types.string by thiago
| From: | thiago@php.net | Date: | Tue, 06 Oct 2009 14:02:57 +0000 |
| Subject: | note 93909 rejected from language.types.string by thiago | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-161398@lists.php.net to get a copy of this message | ||
Note Submitter: rtwent at ukr dot net
----
Having catalogue of poducts in the mysql database.
Every product has a field in the database for storing path to images, e.g.
id - 3;
path - './images/products/level_2';
level - 2;
desc - 'description here';
While uploading new fotos of this product I use the path from the result of database query
($prod_data['path']).
Checking
if(is_dir($prod_data['path'])) { ... } returns false
Checking
if(is_dir('./images/products/level_2')) { ... } returns true
The problem is in the point on the start of the directory path, so renaming the path to
'/images/products/level_2' will give the expected result:
if(is_dir($prod_data['path'])) { ... } returns true
I do not know whether it is bug?
version php 5.3.0