note 93909 added to language.types.string
| From: | rtwent at ukr dot net | Date: | Tue, 06 Oct 2009 10:28:10 +0000 |
| Subject: | note 93909 added to language.types.string | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-161396@lists.php.net to get a copy of this message | ||
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
----
Server IP: 209.41.74.194
Probable Submitter: 89.209.83.2
----
Manual Page -- http://www.php.net/manual/en/language.types.string.php
Edit -- https://master.php.net/note/edit/93909
Del: integrated -- https://master.php.net/note/delete/93909/integrated
Del: useless -- https://master.php.net/note/delete/93909/useless
Del: bad code -- https://master.php.net/note/delete/93909/bad+code
Del: spam -- https://master.php.net/note/delete/93909/spam
Del: non-english -- https://master.php.net/note/delete/93909/non-english
Del: in docs -- https://master.php.net/note/delete/93909/in+docs
Del: other reasons-- https://master.php.net/note/delete/93909
Reject -- https://master.php.net/note/reject/93909
Search -- https://master.php.net/manage/user-notes.php