1. Installation Framework
php composer.phar create-project phpixie/project your_project_folder
2. Setting the path
Original: And here is rules for Apache2 (put to. htaccess in project Root
folder):
RewriteEngine onRewriteBase /RewriteCond %{REQUEST_URI} !web/RewriteRule (.*) /web/$1 [L]我把apache的localhost指向了 localhost/phpixie/web,同时把上面的.htaccess塞在了phpixie路径下(根目录)。
At this time visit http://localhost can get Phpixie Welcome interface
3. Configuring a Controller
bundles/app/src/project/app/httpprocessors/quickstart.php
namespace Project\app\httpprocessors;
Use Phpixie\http\request;
We extend a class that allows controller-like behavior
Class Quickstart extends \phpixie\defaultbundle\processor\http\actions
{
/**
The Builder'll be used to access
Various parts of the framework later on
@var Project\app\httpprocessors\builder
*/
$builder;
function __construct ($builder)
{
$this->builder = $builder;
}
This is the default action
function DefaultAction (Request $request)
{
return "Quickstart tutorial";
}
We'll be adding methods here in a moment
}
// bundles/app/src/Project/App/HTTPProcessor.php//... protected function buildQuickstartProcessor() { return new HTTPProcessors\Quickstart( $this->builder ); }//...然后访问 **http://localhost/quickstart/** 却发现是404
Ask the great God to enlighten me where is the configuration wrong???
Original address:http://www.phpixie.com/quickstart.html
Reply content:
1. Installation Framework
php composer.phar create-project phpixie/project your_project_folder
2. Setting the path
Original: And here is rules for Apache2 (put to. htaccess in project Root
folder):
RewriteEngine onRewriteBase /RewriteCond %{REQUEST_URI} !web/RewriteRule (.*) /web/$1 [L]我把apache的localhost指向了 localhost/phpixie/web,同时把上面的.htaccess塞在了phpixie路径下(根目录)。
At this time visit http://localhost can get Phpixie Welcome interface
3. Configuring a Controller
bundles/app/src/project/app/httpprocessors/quickstart.php
namespace Project\app\httpprocessors;
Use Phpixie\http\request;
We extend a class that allows controller-like behavior
Class Quickstart extends \phpixie\defaultbundle\processor\http\actions
{
/**
The Builder'll be used to access
Various parts of the framework later on
@var Project\app\httpprocessors\builder
*/
$builder;
function __construct ($builder)
{
$this->builder = $builder;
}
This is the default action
function DefaultAction (Request $request)
{
return "Quickstart tutorial";
}
We'll be adding methods here in a moment
}
// bundles/app/src/Project/App/HTTPProcessor.php//... protected function buildQuickstartProcessor() { return new HTTPProcessors\Quickstart( $this->builder ); }//...然后访问 **http://localhost/quickstart/** 却发现是404
Ask the great God to enlighten me where is the configuration wrong???
Original address:http://www.phpixie.com/quickstart.html