From: Pierre R. <pie...@wa...> - 2003-08-31 12:24:59
|
Hello, I tried the example in Alex's "fork" from = http://www.geocities.com/alex_has_email/phrame-alex/ under WindowsXP = Pro. 1/I set USE_LOWERCASE_FOR_ACTIONS at true. Then in = ActionController::_fixWindowsRewriteBug, I got Notice about undefined = index with "action". I added a IsSet test. 2/When I run "Test ActionForwards 1", I get Warning messages about = "Call-time pass-by-reference has been deprecated" in httpSession.php, = with calls to functions Hashmap::put and get. I removed the "call-time = by refences" in httpSession.php. In Hashmap::put, I declare a argument = with pass-by-reference . It seems OK.=20 3/As I haven't put DocumentRoot under Apache directory, I had to change: - xml.php : added a new argument to specify a search directory for the = xls files function transform($xml, $xsls, $params =3D array(), $path =3D '')=20 { //automatically process if subclassed // if (is_null($xml)) { $xml =3D $this->marshal($this); } $xslt =3D xslt_create(); if ( ! is_null($path) ) { xslt_set_base ( $xslt , 'file://' . $path .'/' ) ; } [...] - XSLDispatcher.php : added an instruction to get the search directory = for xls files function forward(){ //prepare for XSL translation $xml =3D $this->_setUp(); $path =3D TEMPLATE_DIR; $webapp_path =3D dirname( $_SERVER['SCRIPT_FILENAME'] ) ; = // >>> new instruction <<< $xsl =3D $this->actionForward->getPath(); if (substr($xsl,0,1)=3D=3D"/") { $xsl=3Dsubstr($xsl,1);} // strip = leading / //release control to view for final rendering $result =3D Xml::transform($xml, array($path.$xsl), $_GET, = $webapp_path); // >>> new argument <<< echo $result; } 4/ With the 2d example, "Say Hi 2", in index.html, I got HTTP 404 = message. I replaced "phrame.php?view=3DsayHi" by = "phrame.php?view=3DsayHelloAsk2.xsl" I think that some more explanation are needed about url_rewriting for = person like me who doesn't master all the tricks of Apache, mod_rewrite = and .htaccess.=20 Regards Pierre Raoul |