url rewritting in php5

From: Date: Mon, 13 Dec 2004 19:49:10 +0000
Subject: url rewritting in php5
Groups: php.general 
Request: Send a blank email to php-general+get-204224@lists.php.net to get a copy of this message
Hello! I'm solving one problem and I'd like to ask you for hints/advices or 'RTFM at <link>' answers. Problem is: I need special type of URL to be 'rewritten' in the way how the Apache does the URL rewritting. example: fopen('chrome://myfile.txt', 'r'); to have be internaly resolved for eaxample as fopen('/var/www/localhost/chrome/myfile.txt', 'r'); I know that there is the way how to register url wrapper in PHP5. It is the solution. But I do not need to implement whole API. Is there way to do something like this? class ChromeWrapper extends PHP_STD_FILE_WRAPPER { function stream_open($path,$mode,$opts,$opened_path) { $path=str_replace('chrome://', '/var/www/localhost/chrome/', $path); parent::stream_open($path, $mode, $opts, $opened_path); } } ... simply implement easily only the path rewritting instead of implementing all the functions that are already done in built-in api. Or is there some way how to register 'filter' that filters $path instead of the content? Thank you for sharing your knowledge Danny 'elixon' Sevcik

« previous php.general (#204224) next »