troubleshooting Question

where does <APACHE HOME> get defined in zend framework

Avatar of rgb192
rgb192Flag for United States of America asked on
PHPWeb Frameworks
23 Comments1 Solution2339 ViewsLast Modified:
zend framework controller
do I write the actual location for <APACHE HOME>
I can not find <APACHE HOME> in /public/index.php

<?php
/**
 * Index.php file.
 *
 */
// Define path to application directory
defined('APPLICATION_PATH')
    || define('APPLICATION_PATH', realpath(dirname(__FILE__) . '/../application'));

// Define application environment
defined('APPLICATION_ENV')
    || define('APPLICATION_ENV', (getenv('APPLICATION_ENV') ? getenv('APPLICATION_ENV') : 'production'));

// Ensure library/ is on include_path
set_include_path(implode(PATH_SEPARATOR, array(
    realpath(APPLICATION_PATH . '/../library'),
    get_include_path(),
)).";".realpath(APPLICATION_PATH . '/models'));


/** Zend_Application */
require_once 'Zend/Application.php';

// Create application, bootstrap, and run
$application = new Zend_Application(
    APPLICATION_ENV,
    APPLICATION_PATH . '/configs/application.ini'
);


/** Routing Info **/
$FrontController = Zend_Controller_Front::getInstance();
$Router = $FrontController->getRouter();

$Router->addRoute("artiststore",
                  new Zend_Controller_Router_Route(
                      "artist/store",
                      array
                      ("controller" => "artist",
                       "action"     => "artistaffiliatecontent"
                      )));

$Router->addRoute("teststore",
		new Zend_Controller_Router_Route(
				"test/store",
				array
				("controller" => "test",
						"action"     => "artistaffiliatecontent"
				)));


$application->bootstrap()
            ->run();






controller
Listing 4-12. ArtistController.php: New Additions
/**
* Display news for users artist.
*/
public function newsAction()
{
//Check if the user is logged in
//Get the user's Id
//Get the artists. (Example uses static artists)
$artists = array("Thievery Corporation",
"The Eagles",
"Elton John");
//Set the view variables
$this >view >artists = $artists;
//Find the view in our new location
$this >view >setScriptPath("<APACHE HOME>");
$this >render("news");
}
ASKER CERTIFIED SOLUTION
Chris Sandrini
Senior System Engineer
Join our community to see this answer!
Unlock 1 Answer and 23 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 23 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros