OM2 Posted March 2, 2009 Share Posted March 2, 2009 I had a thought: if I put my XML code inside of a PHP file, then that would protect it from ever being seen? I can't think why it wouldn't be a good idea! Or surely there's got to be more to it than that? Thanks OM Link to comment https://forums.phpfreaks.com/topic/147646-how-to-hide-your-xml-file-put-inside-a-php-file/ Share on other sites More sharing options...
trq Posted March 2, 2009 Share Posted March 2, 2009 if I put my XML code inside of a PHP file, then that would protect it from ever being seen? How would it? Link to comment https://forums.phpfreaks.com/topic/147646-how-to-hide-your-xml-file-put-inside-a-php-file/#findComment-775088 Share on other sites More sharing options...
premiso Posted March 2, 2009 Share Posted March 2, 2009 The only way that would work is if you set your page up for an if statement then pass data via GET or POST to it to display it. But anyone who can guess that can view it. But since XML needs to be read, you have to echo it out to the page, or else it is really useless. What are you trying to accomplish exactly? Link to comment https://forums.phpfreaks.com/topic/147646-how-to-hide-your-xml-file-put-inside-a-php-file/#findComment-775092 Share on other sites More sharing options...
OM2 Posted March 2, 2009 Author Share Posted March 2, 2009 erm... it sounded like a good idea at the time i was just wanting to protect the file structure of my xml Link to comment https://forums.phpfreaks.com/topic/147646-how-to-hide-your-xml-file-put-inside-a-php-file/#findComment-775113 Share on other sites More sharing options...
br0ken Posted March 3, 2009 Share Posted March 3, 2009 You could store your XML files outside of your http directory? Link to comment https://forums.phpfreaks.com/topic/147646-how-to-hide-your-xml-file-put-inside-a-php-file/#findComment-775162 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.