Re: Questions about writing files with PHP
| From: | Matthew Leverton | Date: | Fri, 07 Jul 2000 21:23:33 +0000 |
| Subject: | Re: Questions about writing files with PHP | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-5465@lists.php.net to get a copy of this message | ||
Just check the FileSystem functions in the manual first. I think you'll
find them quite easy to learn. You can use functions like:
fopen(), fputs(), f...etc...()
If you want the browser to actually download the file instead of
displaying it, then you'll have to adjust the headers via the header()
function. You wouldn't even need to use the fopen() stuff, but no copy
would be saved on the server. I'm not sure exactly what you are looking
for.
As far as file permissions come, PHP (I think) typically is given the
user of "nobody" so it can access anything that "nobody" can. I'm a
Window's PHPer and just started on Linux last week so I could be way
off...
--
Matthew Leverton - matthew@aeroinc.net -
http://www.allegro.cc
-----Original Message-----
From: Matt G. Ellis <mge@internetsyndicate.com>
To: php-general@lists.php.net <php-general@lists.php.net>
Date: Friday, July 07, 2000 4:14 PM
Subject: [PHP] Questions about writing files with PHP
>Hello!
>
>I have a PHP file that looks up information in a database, formats it, and
>then spits back out HTML code.
>
>However I would like to write this HTML code to a file insted, is this
>do-able, and if so how?
>
>Also, how do file permitions come into play on a *NIX system?
>
>Thank you for your help
>
>--Matt
>
>
>--
>PHP General Mailing List (http://www.php.net/)
>To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
>For additional commands, e-mail: php-general-help@lists.php.net
>To contact the list administrators, e-mail: php-list-admin@lists.php.net
>