Thursday , 18 December 2014
Home » PHP Programming » Common Issues/Bugs » How to include multiple javascript files in Zend Framework
How to include multiple javascript files in Zend Framework

How to include multiple javascript files in Zend Framework

Hello Friends,

If you are working with javascript files and using Zend Framework than you must be aware with how to include javascript files in view files ? Look at below syntax to include more than one javascript files.  If you write individual statement for each file than it will include first file 2 times and so on. So include all javascript files in a single statement.

<?php

echo $this->headScript()->appendFile($this->baseUrl() . ‘/public/js/jquery-1.3.2.js’)->appendFile($this->baseUrl() . ‘contact.js’);

?>

Let me know if you find any problem.

About Rakshit Patel

I am PHP Freelancer, Rakshit Patel AKA WordPress Freelancer working as PHP Programmer India. I am here to share all my developing knowledge, quick coding techniques, quick solutions to save your time and help you guys for any issue or bug fixing. If you have any PHP, WordPress, Magento related work, please contact me. I am interested for the work.

4 comments

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>