| | |
PHP and XML
Please support our PHP advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
![]() |
•
•
Join Date: Sep 2006
Posts: 26
Reputation:
Solved Threads: 0
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?
You'll need to use .htaccess to block that file. If your XML files all have a .xml file extension this oughta do it:
PHP Syntax (Toggle Plain Text)
# Block all .xml files from being viewed through a web browser <Files ~ "\.xml$"> Order allow,deny Deny from all </Files>
John Conde
Brainyminds | Merchant Account Services | I Love Code
IT'S HERE: Merchant Accounts 101 Everything you need to know about merchant accounts!
Brainyminds | Merchant Account Services | I Love Code
IT'S HERE: Merchant Accounts 101 Everything you need to know about merchant accounts!
•
•
Join Date: Sep 2006
Posts: 26
Reputation:
Solved Threads: 0
if I don't have a htdocs I create one myself in the public area ?
This block also the search engines or i have to use a robot.txt file?
This block also the search engines or i have to use a robot.txt file?
This 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 small.
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 small.
John Conde
Brainyminds | Merchant Account Services | I Love Code
IT'S HERE: Merchant Accounts 101 Everything you need to know about merchant accounts!
Brainyminds | Merchant Account Services | I Love Code
IT'S HERE: Merchant Accounts 101 Everything you need to know about merchant accounts!
•
•
Join Date: Sep 2006
Posts: 26
Reputation:
Solved Threads: 0
It is not about finding them in the source code, I want the acces to see to be block for everithing, with the exception of the PHP file the acces the file, like a sql database with a password.
I understand why you want to do it. I just wanted to let you know the odds of anyone finding those files is very remote.
John Conde
Brainyminds | Merchant Account Services | I Love Code
IT'S HERE: Merchant Accounts 101 Everything you need to know about merchant accounts!
Brainyminds | Merchant Account Services | I Love Code
IT'S HERE: Merchant Accounts 101 Everything you need to know about merchant accounts!
![]() |
Similar Threads
- Need a PHP programmer with XML experience. (Web Development Job Offers)
- interact between php and flash using xml (PHP)
- Slideshow Des/Dev - PHP/SQL/XML/FLASH/AS/AJAX, not all needed but it wouldn't hurt. (Web Development Job Offers)
- Php parser error when xml version is mentioned (PHP)
Other Threads in the PHP Forum
- Previous Thread: Object Oriented PHP Question
- Next Thread: login form
| Thread Tools | Search this Thread |
apache api archive array autocomplete beginner binary broken cakephp checkbox class cms code cron curl database dataentry date display duplicates dynamic ebooks echo email emptydisplayvalue error execute explodefunction file files firstoptioninphpdroplist folder form forms function functions google href htaccess html image include insert ip javasciptvalidation javascript joomla keywords limit link login mail matching mediawiki menu mlm multiple mysql number oop paypal pdf php phpincludeissue problem query radio random recursion recursive remote script search server sessions shot sms source sp space speed sql subdomain subscription syntax system table tag tutorial tutorials update upload url validator variable vbulletin video web white youtube






