You are here: Re: How can I reliably get an html path with .htaccess 'RewriteBase' « PHP Programming Language « IT news, forums, messages
Re: How can I reliably get an html path with .htaccess 'RewriteBase'

Posted by Toby A Inkster on 04/27/07 10:33

FFMG wrote:

> htt://www.example.tdl/folder1/folder2/page.html
>
> I want to get the folders from the root, so the folder would be
> $f = './folder1/folder2/'
> and the page
> $p = 'page.html'

Something like this?

<?php
$components = explode('/', $_SERVER['REQUEST_URI']);
$p = array_pop($components);
$components[] = '';
$f = implode('/', $components);
?>

--
Toby A Inkster BSc (Hons) ARCS
http://tobyinkster.co.uk/
Geek of ~ HTML/SQL/Perl/PHP/Python*/Apache/Linux

* = I'm getting there!

 

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

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