scanreg Posted May 12, 2011 Share Posted May 12, 2011 I'd like to use a php config file for some javascript Is this possible? Variable values would be in the php config file and the javascript would need to retrieve those values to run the script. If the php config file is called independently, then all that would be displayed is a blank screen. I'm looking for a way to keep some critical values out of the public eye so to speak but still run the script without errors. Thanks Quote Link to comment https://forums.phpfreaks.com/topic/236223-using-php-config-file-for-javascript-possible/ Share on other sites More sharing options...
trq Posted May 12, 2011 Share Posted May 12, 2011 As soon as these values are passed to JavaScript (which would happen when your page was being created or via an Ajax call) they would be on the client-side and available for anyone to see. Not much you can do about that if you need them in your client side code. Quote Link to comment https://forums.phpfreaks.com/topic/236223-using-php-config-file-for-javascript-possible/#findComment-1214685 Share on other sites More sharing options...
scanreg Posted May 13, 2011 Author Share Posted May 13, 2011 Okay, thanks Quote Link to comment https://forums.phpfreaks.com/topic/236223-using-php-config-file-for-javascript-possible/#findComment-1214907 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.