I have used following code in IndexController:
$view = new Zend_View(array('scriptPath' =>'C:\Users\398853\Documents\NetBeansProjects\PhpProject3\application\views\scripts'));
echo $view->render('index.phtml');
But error is displayed as script 'index.phtml' not found in path (C:\Users\398853\Documents\NetBeansProjects\PhpProject3\application\views\scripts/)
I think the error occured because in script path ‘/’ added instead of ‘\’ at end.If yes then what is the solution for that?
You need to pass the relative path to the script with the script path as base path so:
Should work. This is expecting you mean index action of index controller.
The directory separators are not important to PHP. If you want to be 100% on the save side use the constant DIRECTORY_SEPARATOR like this: