Current time: 04-20-2014, 04:34 PM Hello There, Guest! (LoginRegister)

Post Reply 
Can I read a file when allow_url_fopen is disabled?
02-16-2012, 10:29 AM
Post: #1
Can I read a file when allow_url_fopen is disabled?
I'm using PHP.

Is it possible to open a local file on my domain using file_get_contents while keeping allow_url_fopen disabled?

I would use $_SERVER['DOCUMENT_ROOT'] for the pathway.
Find all posts by this user
Quote this message in a reply
02-16-2012, 11:22 AM
Post: #2
RE: Can I read a file when allow_url_fopen is disabled?
Yes; allow_url_fopen only affects whether you can use PHP file functions on URLs, e.g:
Code:
file_get_contents("http://www.google.com/")
Find all posts by this user
Quote this message in a reply
02-16-2012, 11:33 AM
Post: #3
RE: Can I read a file when allow_url_fopen is disabled?
good to hear... thanks, andrew.
Find all posts by this user
Quote this message in a reply
Post Reply 


Forum Jump: