how to include a php config file in javescript file ? - Webmaster Forums - Webmaster forum for HTML, PHP, ASP, CSS and more
Webmaster Forums - Webmaster forum for HTML, PHP, ASP, CSS and more
Go Back   Webmaster Forums - Webmaster forum for HTML, PHP, ASP, CSS and more > Webmaster Tech > Programming > PHP Development

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old 04-21-2010, 07:33 AM   #1 (permalink)
Junior Member
 
Join Date: Apr 2010
Posts: 48
Default how to include a php config file in javescript file ?

such as in js file j.js
I wanna evalue js variable to a php Constant varialble defined in config.php
so I need include the config.php
how to do this?
qust is offline   Reply With Quote
Sponsored Links
Old 04-22-2010, 02:19 PM   #2 (permalink)
Junior Member
 
Join Date: Nov 2009
Posts: 17
Default Re: how to include a php config file in javescript file ?

This is what you need ?

Quote:
<javascript code>
var myvariable=<?php echo $phpconstant; ?>;
<javascript code>
webTHEmaster is offline   Reply With Quote
Old 04-23-2010, 10:48 AM   #3 (permalink)
Junior Member
 
Join Date: Apr 2010
Posts: 48
Default Re: how to include a php config file in javescript file ?

Quote:
Originally Posted by webTHEmaster View Post
This is what you need ?

<javascript code>
var myvariable=<?php echo $phpconstant; ?>;
<javascript code>

Y,
there is a constant variable in a php file
but how to include the php file?
qust is offline   Reply With Quote
Old 04-24-2010, 12:43 AM   #4 (permalink)
Junior Member
 
Join Date: Apr 2010
Posts: 48
Default Re: how to include a php config file in javescript file ?

any one help?
qust is offline   Reply With Quote
Old 05-18-2010, 06:31 AM   #5 (permalink)
Junior Member
 
Join Date: May 2010
Posts: 3
Default Re: how to include a php config file in javescript file ?

Try to do the oposite, include to javascript file into the php file.
c_cicca is offline   Reply With Quote
Old 05-18-2010, 04:12 PM   #6 (permalink)
Member
 
Join Date: Apr 2010
Posts: 132
Default Re: how to include a php config file in javescript file ?

I have no idea on this one because I am still trying to learn Java. (This might not even have to do with Java)

But, I really recommend you ask this question on here:
Programming - myhosting.com Forums

I had several PHP questions and there is a real helpful guy there Richie who helped me a lot in getting the coding right.
chrisphs09 is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



» Sponsors

» Links

» Affiliates
Web Hosting
Online Backup Reviews
Marketing Find
Merchant Select
SiteMap Builder
Host Compare

» Links

» Sports Network
Paintball Forum
Football Forum
Hockey Forum
Golf Forum
Boxing Forum
Lacrosse Forum
Baseball Forum
SnowBoarding Forum
Soccer Forum
MMA Forum


All times are GMT -4. The time now is 07:49 PM.


Powered by vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.2
Webmaster Forums
Web Hosting | Chicago Web Hosting | Web Hosting