Jump to content

Can php code put inside .js file?


teongkia

Recommended Posts

No (well, not unless you reconfigure your web server to allow it), but you can generate javascript using a php script.  Then you will have a .php file which outputs javascript instead of html.  Or you can output javascript inline into the html using PHP.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.