accessing a javascript/css from within zend framework's application directory
so suppose inside the views/scripts directories within the application folder of my zend framework project, I would like to put in javascript/css files and then I would like to add these to my pages...
what would be the best way in doing so since if I just put in the full path to the file i开发者_开发知识库t will complain that it can't find the 'application' controller...
JavaScript and CSS (and images, flash and any other public, static asset) should go under the public
directory.
You reference these in your view / layout using the appropriate view helper
<?php echo $this->headScript()->appendFile(
$this->baseUrl('path/to/script.js')) ?>
If you must place these in your application
directory, consider creating symbolic links under the public directory.
精彩评论