Reply to Re: Obtaining the base dir of a file in a web server

Your name:

Reply:


Posted by Jason Barnett on 01/17/05 16:28

Juan Antonio Garrido wrote:
> Hi everybody:
>
> I use this sentence ($htmlFile = $_SERVER['DOCUMENT_ROOT'] ) for obtaining the
> complete route of a file in my web server, but inserts a white space to
> final char and i need remove it. I use the trim function but it continue
> there. How can i remove it? Can it be anohter char?
>
When dealing with absolute file paths I find it helpful to use realpath()
http://www.php.net/manual/en/function.realpath.php


--
Teach a person to fish...

Ask smart questions: http://www.catb.org/~esr/faqs/smart-questions.html
PHP Manual: http://www.php.net/manual/en/index.php
php-general archives: http://marc.theaimsgroup.com/?l=php-general&w=2

[Back to original 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

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