I'm working my way through the Apress book "Beginning Zend Framework" - and am struggling to get one of the examples to work.
The aim is to circumvent the standard directory structure using setScriptPath. Rather than storing the action's associated view script in the scripts directory, the tutorial asks you to save it elsewhere in the project directory. I've stored it in the root of application. Here's the code:
public function updateAction()
{
//get the artists
$artist = array("Thievery Corporation","The Eagles","Elton John");
//set view variables
$this->view->artists = $artist;
//locate the view
$this->view->setScriptPath('/application/');
$this->render("update");
}
However, when I try to go to www.domain.com/account/update - it says it can't locate the script. What I need to know is how to define the location of a folder relative to the framework structure. I've used getScriptPath on scripts within the existing script folder, but they return absolute hard-disk paths, which I'm not sure is correct - and of course I can't use getScriptPath from the update.phtml script, because I can't load it.
Any zend gurus able to help me?