I have written a script that takes the review of a purchase and stores in into an XML file, except the issue is that I'm not going individuals to have the ability to open the XML file within their browser, clearly.
I am located on the very dodgy shared server with limited capabilities: no SSH, to begin with.
It is possible to place I'm able to put this file to ensure that PHP will still have the ability to read/email it, but browsers will not have the ability to reach it?
Ordinarily, I'd produce a folder outdoors the document root and set it there, however i obtain a "Permission refused" message after i try that.
The folders which are you will find:
PHP can't access the file when it is within the
private folder. Would this be possible using .htaccess?
You can produce a directory that contains a
.htaccess file that appears something similar to the next:
This can instruct Apache to not serve files from that directory any tries to access your directory or its contents is going to be met having a "403 Forbidden" response in the server.
Note: This is dependent upon the host not getting removed
Limit in the listing of options within their
AllowOverride directive most shared hosts should not possess a reason to get this done.
I labored around it by putting the XML file during my httpdocs folder, but added b .htaccess file with this particular inside it:
<Files ~ "myfile.xml"> Order allow,deny Deny all </Files>
Could not you request the shared-host company to produce an outdoors-web-root folder for you personally? I have certainly carried this out previously.