Wrox Programmer Forums
Go Back   Wrox Programmer Forums > PHP/MySQL > PHP How-To
PHP How-To Post your "How do I do this with PHP?" questions here.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the PHP How-To section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Old April 10th, 2007, 12:18 PM
Authorized User
Join Date: Apr 2007
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
Default how can i create file using php

i want to create file using php. how can i do that?

thanks in advance.

Old April 11th, 2007, 05:58 PM
Registered User
Join Date: Apr 2007
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts

What file type you wannt?

For to make a TXT file this is the last instruction:

header("Content-type: application/x-msdownload");
header("Content-type: application/txt");
header("Content-Disposition: attachment; filename=$fiche");
header("Pragma: no-cache");
header("Expires: 0");
print "$data";

The $data field contain all words you want!


(I'm sorry for my english, I'm spanish)

Similar Threads
Thread Thread Starter Forum Replies Last Post
How to create SiteMapPath in PHP? firblazer PHP How-To 0 July 14th, 2008 09:33 PM
Create pdf file using PHP angshujit PHP How-To 1 February 24th, 2007 10:07 AM
PHP Create Database problem sweyhrich Beginning PHP 9 January 29th, 2007 06:39 AM
Create +/- hiearchy using PHP? anshul Pro PHP 2 June 20th, 2005 04:43 PM
how to create/use php template file/system junemo Beginning PHP 1 April 23rd, 2004 03:47 PM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.