Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

php in a js-file??

Status
Not open for further replies.

cyberwolf14

Programmer
Aug 27, 2001
65
BE
hello

How can I put codes from php in a js-file??
I think it's somthing with a .htaccess-file but i don't now what i have to do whit it

plaese help me
 
Why not call the JavaScript file '*.php'? Then when you call it in your html file:

Code:
<SCRIPT src=&quot;*.php&quot; language=&quot;JavaScript&quot;></SCRIPT>

If you do want to change the .htaccess file add the following line to it:

Code:
AddType application/x-httpd-php .js
Girish Gupta
girish@musicgoeson.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top