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 IM_View_Helper_BaseUrl extends Zend_View_Helper_Abstract | |
{ | |
public function baseUrl() | |
{ | |
return Zend_Registry::get('config')->app->baseUrl; | |
} | |
} | |
?> |
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
<head> | |
<title></title> | |
<base href="<?php echo $this->baseUrl();?>" /> | |
</head> | |
<body> | |
... | |
</body> |
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
[production] | |
app.baseUrl = "http://www.server.com" | |
[staging : production] | |
app.baseUrl = "http://staging.server.com" | |
[testing : production] | |
app.baseUrl = "http://testing.server.com" | |
[development : production] |
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 Bootstrap extends Zend_Application_Bootstrap_Bootstrap | |
{ | |
protected function _initConfig() { | |
//path of configuration file | |
$path = APPLICATION_PATH.'/configs/application.ini'; | |
//Get the configuration data | |
$config = new Zend_Config_Ini($path); | |
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 | |
require_once('/path_of_your_library/Doctrine.php'); | |
spl_autoload_register(array('Doctrine', 'autoload')); | |
Doctrine_Core::compile('Doctrine.compiled.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 | |
class Bootstrap extends Zend_Application_Bootstrap_Bootstrap | |
{ | |
public function _initDoctrine() | |
{ | |
$config = $this->getResource('config'); | |
$config = $config['doctrine']; | |
require_once('Doctrine.compiled.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 compile.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 | |
class Me_Controller_Plugin_Facebook extends Zend_Controller_Plugin_Abstract | |
{ | |
public function preDispatch($request) | |
{ | |
//Initialize Facebook Api | |
require(APPLICATION_PATH.'/../library/facebook.php'); | |
$facebook = new Facebook(array( | |
'appId' => FACEBOOK_APIKEY, | |
'secret' => FACEBOOK_APISECRET, |
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
<span></span> | |
<style> | |
span { | |
height:0; | |
width:0; | |
border-width:5px; | |
border-style:solid; | |
border-color:red transparent transparent transparent; | |
} |
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 View_Helper_BaseUrl extends Zend_View_Helper_Abstract | |
{ | |
public function baseUrl() | |
{ | |
return 'http://localhost/myapplication'; | |
} | |
} | |
?> |
OlderNewer