From: Jason S. <jsw...@ya...> - 2003-01-13 16:58:19
|
Perhaps if the "Phrame"work were altered to have a ShowView() method for the controller, you could just do $this->ShowView($forward_view); and the script would continue processing that view (which would have to be a part of your phrame application view, not any arbitrary page). I suppose you could do a hack with something like a fopen to the page and burp the results back with a print ;-p Jason --- Arnold Cano <arn...@ya...> wrote: > Ross is correct that in Struts the REDIRECT flag > determines whether the system uses the forward() or > sendRedirect() method. However, since PHP does not > have an equivalent to the forward() method, Phrame > uses the header() method in both cases. The only > difference being that when the REDIRECT flag is in > place the session information is destroyed before the > header(). > > Does anyone know if there is a way to "forward" to > another page on the server (server side) without using > the header() method? I may be wrong but my > understanding is that the header('Location: '.$path) > method asks the browser to fetch the $page (client > side). > > Arnold > > --- Jason Sweat <jsw...@ya...> wrote: > > --- Ross Keatinge <ro...@po...> wrote: > > > I think there is a need for both. Isn't that what > > the 'forward' or > > > 'redirect' choice in the mapping does in Struts? > > Certainly if your > > > initial request is a GET then I don't see why it > > should always come > > > back with a redirect. Maybe that is what you mean, > > only force it to > > > happen with a POST. > > > > I would agree with that. I think this could be > > accomplished by using setting > > the _REDIRECT setting for each _ACTION_FORWARD array > > to true or false. The > > ActionController would then either: > > if (_REDIRECT) { > > header('Location: '._PATH); > > } else { > > $_GET[_VIEW] = [view portion of _PATH] > > } > > > > the application.php would look like: > > > > if (!array_key_exists(_CONTROLLER, $_SESSION)) { > > $controller = new ActionController($options); > > $_SESSION[_CONTROLLER] = $controller; > > } > > $controller = &$_SESSION[_CONTROLLER]; > > if (array_key_exists(_ACTION, $_REQUEST)) { > > //release control to controller for further > > processing > > $controller->process($mappings, $_REQUEST); > > } > > $controller->showView(); > > > > That way, if there is an action specified, process > > it. If it redirects, you > > are done, else you always try to display a view > > (either action did not > > redirect, or there was no action specified to begin > > with). > > > > Regards, > > > > Jason > > > > > > __________________________________________________ > > Do you Yahoo!? > > Yahoo! Mail Plus - Powerful. Affordable. Sign up > > now. > > http://mailplus.yahoo.com > > > > > > > ------------------------------------------------------- > > This SF.NET email is sponsored by: > > SourceForge Enterprise Edition + IBM + LinuxWorld = > > Something 2 See! > > http://www.vasoftware.com > > _______________________________________________ > > Phrame-devel mailing list > > Phr...@li... > > > https://lists.sourceforge.net/lists/listinfo/phrame-devel > > > __________________________________________________ > Do you Yahoo!? > Yahoo! Mail Plus - Powerful. Affordable. Sign up now. > http://mailplus.yahoo.com > > > ------------------------------------------------------- > This SF.NET email is sponsored by: FREE SSL Guide from Thawte > are you planning your Web Server Security? Click here to get a FREE > Thawte SSL guide and find the answers to all your SSL security issues. > http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0026en > _______________________________________________ > Phrame-devel mailing list > Phr...@li... > https://lists.sourceforge.net/lists/listinfo/phrame-devel __________________________________________________ Do you Yahoo!? Yahoo! Mail Plus - Powerful. Affordable. Sign up now. http://mailplus.yahoo.com |