I use PHP to access a XML data file. I don't want that XML to be access by browser(see) access only data with php. How to block the access to the XML for everithing else except the PHP file?
Alexandro
0
Light Poster
Recommended Answers
Jump to PostYou'll need to use .htaccess to block that file. If your XML files all have a .xml file extension this oughta do it:
# Block all .xml files from being viewed through a web browser <Files ~ "\.xml$"> Order allow,deny Deny from all </Files>
Jump to PostThis will block everyone. It goes in a file called .htaccess and it needs to be in your root directory.
Keep in mind that no one can find these files unless you someone have their location in your source code. Otherwise the odds of someone finding them will be …
All 5 Replies
stymiee
111
He's No Good To Me Dead
Team Colleague
Alexandro
0
Light Poster
stymiee
111
He's No Good To Me Dead
Team Colleague
Alexandro
0
Light Poster
stymiee
111
He's No Good To Me Dead
Team Colleague
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.