Dethman Posted December 16, 2008 Share Posted December 16, 2008 Does anyone know how to get the php off of another server using a file on say a local host using something like this: Link: http://localhost/test/retrieveFile.php?fileLink=http://webdomain.com/main_file.php <?php $fileLink=$_GET['fileLink']; include($fileLink); ?> Any help Would be awesome so I didnt have to FTP my site to view a file Link to comment https://forums.phpfreaks.com/topic/137136-link-file-retrieval/ Share on other sites More sharing options...
trq Posted December 16, 2008 Share Posted December 16, 2008 You cannot view php code when the file is requested via http. It will be processed by the server as normal and the output sent back to you. Link to comment https://forums.phpfreaks.com/topic/137136-link-file-retrieval/#findComment-716354 Share on other sites More sharing options...
Dethman Posted December 16, 2008 Author Share Posted December 16, 2008 Any way I can do something like this but different? Link to comment https://forums.phpfreaks.com/topic/137136-link-file-retrieval/#findComment-716357 Share on other sites More sharing options...
trq Posted December 16, 2008 Share Posted December 16, 2008 If the remote server is configured to do so you could try calling the file with the .phps extension. This will spit out a syntax highlighted string on a server configured to do so. Link to comment https://forums.phpfreaks.com/topic/137136-link-file-retrieval/#findComment-716358 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.