Saturday, 23 April 2016

Export to excel error in PHP reports

I export reports as excel using PHP & MySql. I can export and open the file from my localhost using my source code, but unable to do in the server. When I try to export it shows
"
Warning: tempnam() [function.tempnam]: open_basedir restriction in effect. File() is not within the allowed path(s): (/home:/tmp:/usr) in /home/xx/xx.inc.php on line 205.
"
I googled through, but I'm unable get the solution.




$this->_tmpfilename=tempnam("/tmp", "excelreport");




$fh=fopen($this->_tmpfilename, "w+b");




This is the code that used. What's wrong.

No comments:

Post a Comment

c++ - Does curly brackets matter for empty constructor?

Those brackets declare an empty, inline constructor. In that case, with them, the constructor does exist, it merely does nothing more than t...