HTTP redirection with the redirect() method. It is possibile to display additional content in the redirect page because the method does not exit the script.
Sets the header with the given redirect type.
$url URL to redirect. Use null for not add the “Location” header.
$type Type of redirection.
For convenience Phraw helps to set success and error headers.
Sets the header with the given error type.
$type Type of client error.
Sets the header with the given success type.
$type Type of success message.
A simple method that prepend or append an include path.
<?php
#...
$phraw->add_include_path('lib'); # Add the "lib" directory to the include path
# Load the Smarty extension from "lib/phraw/extensions/"
require_once('phraw/extensions/smarty.php');
$smarty = new SmartyTemplateEngine();
?>
Sets the header with the given redirect type.
$include_path path to add to the include path.
$append if true append the path, if false prepend it.
This method is used by the Phraw’s constructor for fetch the request URI.
$get_key the name of the GET parameter that contains the URI.
Returns the URI string.
Sometimes it is useful to get the current domain with the http/https protocol prefix in order to prepare absolute links in templates.
Returns protocol and domain name. Eg. http://www.mysite.com