is there a way to get/retrieve the value/parameters in a ‘file_get_contents’ in php file using javascript? my php code is…
<?php
(file_get_contents("http://localhost/" . $_GET["path"] . "?json=" . urlencode($_GET["json"])));
?>
i want to display the value inside the ‘file_get_contents’ in my html using javascript. is there anybody here who could help me? please… thank you..
edit… how to show the xmlhttprequest in my html using javascript? thank you
PHP is server side while Javascript is client side. The only way to get you parameters to js would be to return them via an array in an ajax call (ie. return as json) or echo the parameters to the final page where the js will hold them.