I wrote a php script which outputs html files on the screen which uses readfile($htmlFile); however in the web-hosting that I have purchased the readfile() has been disabled for security reasons. Is there any substitution ( other php functions) for the readfile() or I have no choice but to ask the admin to enable it for me?
Thanks
You can check which functions are disabled by using:
You can try to use fopen() and fread() instead:
http://nl2.php.net/manual/en/function.fopen.php
http://nl2.php.net/manual/en/function.fread.php
Or fopen() with fpassthru()
Alternatively you can use fwrite() to write content.
You can also try to use file_get_contents()
http://nl2.php.net/file_get_contents
Or you can use file()
http://nl2.php.net/manual/en/function.file.php
I wouldn't recommend this method though, but if nothing works...
If its disabled then you could do something like following as alternative:
Hope it helps
You can try :