You are here: Re: Need a simple database for name and email only « All PHP « IT news, forums, messages
Re: Need a simple database for name and email only

Posted by Steve on 03/24/07 22:02

btw, all of these reference this script...it just determines what your
relative path is given where a script is accessed based on your directory
structure. based on the system on which you run, you may need to take out
the - 1 at the end of line 4. i use this because even though there is a
$_SERVER variable letting you know this same information, it is reliant on
php compiled options and versions of php...this is the sledgehammer
approach.

======== relative.path.php

<?
$parsedUri = dirname($_SERVER['PHP_SELF']);
$relativeUri = str_replace('/', '', $parsedUri);
$relativePath = strlen($parsedUri) - strlen($relativeUri) - 1;
if ($relativePath < 0){ $relativePath = 0; }
$relativePath = str_repeat('../', $relativePath);
if (!$relativePath){ $relativePath = './'; }
?>

 

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

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