Non-PHP alternative to PHP include
I am attempting to load static navigational cont开发者_如何学运维ent into many pages on my website. Normally I would use either a PHP include or a SSI. However, my university web page server only allows these methods on the club servers (I do club websites too). On the personal page servers, we really only have access to Perl and Python (No PHP, SSI, or Ruby).
So my question is: Is there any way to allow me to include this static content on multiple pages (such as navigationally bars and footers to allow for maintainability) without PHP or SSI?
Thanks!
In Perl, there are many templating engines to choose from; my preference is Template Toolkit.
You may want to start reading about it here.
As long as javascript is not disabled you can import the static content or dynamic information using AJAX.
You should be able to use jQuery with either Python or Perl over the CDN. Then use jQuery's AJAX methods to get your data and insert it into the page.
精彩评论