View gist:987317
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
LoadModule rewrite_module modules/mod_rewrite.so | |
AddModule mod_rewrite.c | |
AllowOverride all |
View gist:987319
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
LoadModule rewrite_module modules/mod_rewrite.so | |
AddModule mod_rewrite.c | |
AllowOverride all |
View gist:987325
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CREATE DATABASE blog; | |
GRANT ALL privileges ON blog.* TO zend@localhost IDENTIFIED BY 'zend'; | |
USE blog; | |
CREATE TABLE IF NOT EXISTS `users` ( | |
`id` INT NOT NULL AUTO_INCREMENT , | |
`username` VARCHAR(200) NOT NULL , | |
`password` VARCHAR(250) NOT NULL , |
View gist:987331
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
RewriteEngine On | |
RewriteRule !\.(js|ico|gif|jpg|png|css|htm|html)$ index.php |
View gist:987332
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<VirtualHost *:80> | |
DocumentRoot "/Applications/MAMP/htdocs/blog" | |
ServerName blog.local | |
SetEnv APPLICATION_ENV "development" | |
<Directory "/Applications/MAMP/htdocs/blog"> | |
Options Indexes MultiViews FollowSymLinks | |
AllowOverride All | |
Order allow,deny | |
Allow from all | |
</Directory> |
View index.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Arquivo Principal da Aplicacao, responsavel pelo processamento | |
* de todas as requisicoes, todos os caminhos para os arquivos | |
* serao contruidos aqui para serem utilizados ao longo da requisicao | |
* E responsavel tambem por carregar o front-controller da aplicacao | |
* E por consequencia tambem carrega o controller requisitado | |
* @author Andre Gustavo Espeiorin <xorna@coderockr.com> | |
* @author Elton Luís Minetto <eminetto@coderockr.com> | |
* @version 1.0 |
View gist:987340
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;ambiente de desenvolvimento | |
[production] | |
;database | |
db.adapter = Pdo_Mysql | |
db.host = localhost | |
db.username = userName | |
db.password = password | |
db.dbname = dataBase | |
;translate |
View gist:987343
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class IndexController extends Zend_Controller_Action { | |
public function showAction() { | |
} | |
} |
View gist:987345
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class Admin_IndexController extends Zend_Controller_Action { | |
public function showAction() { | |
} | |
} |
View gist:987348
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$postRoute = new Zend_Controller_Router_Route( | |
'post/:id', | |
array( | |
'module' => 'dafault', | |
'controller' => 'post', | |
'action' => 'view' | |
) | |
); | |
$router = $frontController->getRouter(); | |
$router->addRoute('post', $postRoute); |
OlderNewer