gist: 17152 Download_button fork
public
Description:
Zend Framework 1.6.2のZend_Toolで作られたファイル
Public Clone URL: git://gist.github.com/17152.git
.htaccess
1
2
3
4
5
6
7
8
9
10
RewriteEngine On
 
RewriteCond %{REQUEST_FILENAME} -s [OR]
RewriteCond %{REQUEST_FILENAME} -l [OR]
RewriteCond %{REQUEST_FILENAME} -d
 
RewriteRule ^.*$ - [NC,L]
RewriteRule ^.*$ /index.php [NC,L]
        
        
bootstrap.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
<?php
// ** Check to see if the environment is already setup **
if (isset($bootstrap) && $bootstrap) {
    // Enable all errors so we'll know when something goes wrong.
    error_reporting(E_ALL | E_STRICT);
    ini_set('display_startup_errors', 1);
    ini_set('display_errors', 1);
 
    // Add our {{library}} directory to the include path so that PHP can find the Zend Framework classes.
    // you may wish to add other paths here, or keep system paths: set_include_path('../library' . PATH_SEPARATOR . get_include_path()
    set_include_path('../library');
 
    // Set up autoload.
    // This is a nifty trick that allows ZF to load classes automatically so that you don't have to litter your
    // code with 'include' or 'require' statements.
    require_once "Zend/Loader.php";
    Zend_Loader::registerAutoload();
}
 
// ** Get the front controller **
// The Zend_Front_Controller class implements the Singleton pattern, which is a design pattern used to ensure
// there is only one instance of Zend_Front_Controller created on each request.
$frontController = Zend_Controller_Front::getInstance();
 
// Point the front controller to your action controller directory.
$frontController->setControllerDirectory('../application/controllers');
 
// Set the current environment
// Set a variable in the front controller indicating the current environment --
// commonly one of development, staging, testing, production, but wholly
// dependent on your organization and site's needs.
$frontController->setParam('env', 'development');
        
 
index.php
1
2
3
4
5
6
7
8
<?php
// @see application/bootstrap.php
$bootstrap = true;
require '../application/bootstrap.php';
 
// $frontController is created in your boostrap file. Now we'll dispatch it, which dispatches your application.
$frontController->dispatch();
 

Owner

twxxk

Revisions