Where is my file?
Hi every body,
I am creating a small project to manage some books for my team. Exporting database to an Excel (*.xls) file is very important because an the team's member will use that file to import into an barcode printing application.
I found Class: MS-Excel Stream Handler (excel, xls, spreadsheet, read excel) - PHP Classes . This class is useful. I could get an Excel file like I expected (through download, cannot find file on server).
The problem was I cannot understand:
What is xlsfile:// ? The class's author said that. It is protocol to generate Excel file.
I cannot find example.xls in any folder on my PC. If I change xlsfile://tmp/example.xls into absolute path like xlsfile://C:/temp/example.xls or any another, an error:
I use Windows XP Service Pack 2. The web server is localhost use AppServ 2.5.10. The web server was installed in C:\AppServ as default.
Please tell me can I get my file. Which file was generated and store on server (NOT from download).
xlsfile:// is known as a protocol for your browser. Think like http://, or ftp://, or file://
Probably, it's used by IE and excel to open an excel file without having to physically create it.
But what strikes me is that you have an unix/linux/bsd file path notation in there:
Try maybe to look in the temp folder of your server/user, as /tmp is the regular temp place on linux.
But by the way, it's even way simpler than that...
Simply create an html table, and send an header like this:
in my case..
I think you have two files.
1. excel.php (74th row)
We want relative path.
2. And you have another download page like your code.
This is point!
First, 'excel.php' and 'download page' and the directory name 'tmp' located in the same directory!
Second, you must look 'tmp' directory's permission. I think this permission should be 757 at least.
english is not my native language.
so I'm hard writing english.
anything.. good luck!
It would be advisable to fix the class to work as expected; relative to the current working directory unless an absolute, full path is specified. It is also advisable to turn your error reporting to the most aggressive setting during development: like error_reporting(E_ALL | E_STRICT).
|All times are GMT. The time now is 05:27 PM.|
Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0