You are here: Re: Explode + url faking problem « PHP Programming Language « IT news, forums, messages
Re: Explode + url faking problem

Posted by the DtTvB on 05/29/06 18:04

Let me guess it, you did mod_rewite
RewriteRule ^/(.+?)$ index.php?$1

Is that what you want?
<?php
$requested_page = $_SERVER['QUERY_STRING'];
$requested_page = preg_replace('~/+~', '/', $requested_page);
$requested_tree = explode('/', $requested_page);
?>

I tested with
http://localhost/test5.php?folder//////subfolder///yo///lol and it said
that
$requested_tree is Array (
[0] => folder
[1] => subfolder
[2] => yo
[3] => lol
)

 

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

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