Thursday, March 21, 2019

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

plot explanation - Why did Peaches' mom hang on the tree? - Movies & TV

In the middle of the movie Ice Age: Continental Drift Peaches' mom asked Peaches to go to sleep. Then, she hung on the tree. This parti...