(php) 一个PHPixie框架的问题

1. 安装框架

php composer.phar create-project phpixie/project your_project_folder

2.设置路径

原文:And here are rules for Apache2 put into .htaccess in project root
folder:

RewriteEngine on
RewriteBase /
RewriteCond %{REQUEST_URI} !web/
RewriteRule .* /web/$1 [L] 我把apache的localhost指向了 localhost/phpixie/web,同时把上面的.htaccess塞在了phpixie路径下(根目录)。

这时候访问http://localhost 可以得到phpixie的欢迎界面

3. 配置一个控制器

// bundles/app/src/Project/App/HTTPProcessors/Quickstart.php

namespace ProjectAppHTTPProcessors;

use PHPixieHTTPRequest;

// we extend a class that allows Controller-like behavior
class Quickstart extends PHPixieDefaultBundleProcessorHTTPActions
{

/**
    • The Builder will be used to access

    • various parts of the framework later on

    • @var ProjectAppHTTPProcessorsBuilder
      */

    1. $builder;

    2. function __construct$builder
      {

       $this->builder = $builder;

      }

      // This is the default action

    3. function defaultActionRequest $request
      {

       return "Quickstart tutorial";

      }

      //We will be adding methods here in a moment
      }

    // bundles/app/src/Project/App/HTTPProcessor.php //... protected function buildQuickstartProcessor { return new HTTPProcessorsQuickstart $this->builder ; }
    //... 然后访问 **http://localhost/quickstart/** 却发现是404
    

    求大神赐教我是哪里配置错了???

    原文地址:http://www.phpixie.com/quickstart.html

    发表评论

    电子邮件地址不会被公开。 必填项已用*标注