You are here: realpath(dirname(__FILE__)) returning empty string « All PHP « IT news, forums, messages
realpath(dirname(__FILE__)) returning empty string

Posted by laredotornado@zipmail.com on 06/30/07 21:18

Hi,

I'm using PHP 4.4.7. When I define a constant as

define("SITE_ROOT_DIR", dirname(__FILE__));

the result is the value ".". The real directory path should be "/home/
myaccount/web". So I tried

define("SITE_ROOT_DIR", realpath(dirname(__FILE__)));

on the advice of another, but now I'm getting an empty string. Any
ideas how to overcome this? I'd prefer not to hard code paths because
my development server path is different.

Thanks, - Dave

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация