how to print the contents of a remote .php file -
my code:
$fp = fopen('http://192.168.127.128/test.php', 'rb'); while(!feof($fp)){ echo fgets($fp); } fclose($fp); and test.php is:
<?php phpinfo(); i want print contents of test.php, prints result of test.php actually. should print contents of test.php?
if want contents / code of remote php file, typically need sftp off server or retrieve in way isn't executed. if run web server , don't want execute php files @ all, can configure web server render php code text file.
when access php file on url http://192.168.127.128/test.php, php file typically interpreted web server , receive output result.
Comments
Post a Comment