Jump to content

What is exporting .php file to other types of file extension?


lcy

Recommended Posts

Hello everyone! :)

 

In my current project, i'm reqiured to export the summary report to other types of file extension, including html, pdf, xls, txt, csv, ods and sxc. The problem is that i don't know a single thing about this file exporting.

 

Hope to get some information about file exporting here. And how should i start this task? Thanks in advance. Help is appreciated.

You would simply use PHP to write to a file for most of those. See tutorial below. Based upon the file type you would prepare the data differently: e.g., a CSV file you would write as comma separated, and HTML file would have HTML tags, etc. Other file types, such as PDF, can be generated using PHPs build in PDF library or even third party tools. Then others may not have a direct PHP solution.

 

http://www.tizag.com/phpT/filewrite.php

Thanks for info provided. But i still don't get how should i do this export thing. Is it i need to download some codes for exporting .php files to those required files options, link them to my codes and that will do ...or what? Sorry for not getting what you guys mean because i don't have any single concept of this.

Did you read the tutorial I linked to? If you read that it should get you started. To export to any particular file type you will need to know the format of that file and write a file in that format. If you can't follow the tutorial to get the basics, I'm not sure how we can help you in a forum. If, however, you have specific questions about things int he tutorial, then by all means ask.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.