2

include "filename.php" Question

http://drupal.org

Hi, I'm looking for a way to include a php file (re-named as .inc), into my drupal theme which I seem to have sorted with:
include "custom.inc"; (in template.php)

However, the php script in 'custom.inc' has javascript embeded in it using:
header('Content-Type: text/javascript'); (at the start of the custom.inc file)

This seems to confuse my page somehow and I get the entire custom.inc and html page source printing onto the page as text.

I can't find a way to include a php file into my theme that also work along side javascript, sharing variables.

Can anyone offer some guidance or suggestions.

Many thanks,
fiasst

Read »
Created by Dplanet 2 years 35 weeks ago
Category: Theming   Tags:

PSD to Drupal Theme

Drupal Development

Module Development

Get an Estimate

Recent comments