I am working on a control panel for a game server and hence keeping config files in the www directory is the worst thing I could probably do.
I need to access a file called latest.tx in /srv/
So, how do I do it?
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
to answer to this question requires more details. <br>Do you have Su-Exec ? Does PHP run under mod_php or PHP-FPM? <br>also what chroot uses (if it uses) Apache as well as PHP. <br>http://www.php.net/manual/en/function.chmod.php <br> <br>BTW: <br>and please do not post again as an answer to “https://www.digitalocean.com/community/questions/any-real-private-networking-solution” if you do not understand what I’m talking about.
Try reading <code>/srv/latest.tx</code>, e.g. <code>file_get_contents(‘/srv/latest.tx’);</code>Assuming the user apache is running as (most likely www-data) has access to read the file, it should work.
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.