Click to See Complete Forum and Search --> : Creating a .xxx via PHP


Anon
07-20-2001, 03:17 AM
Hi!

I've got installed an Apache+PHP server on my LinuxBox.

I want to create a 'myname.foo' file, but generated via PHP.

I mean:

----//----

<?php

header("Content-type: FooType");
....

-----//-----

I modify my 'httpd.conf' file, and insert:
AddType FooType .foo

But when browsing 'myname.foo', this is not generated, I only get the '<?php ....'.

How can I tell Apache to generate .foo files by using PHP?

Regards,

willythemax
07-24-2001, 01:54 PM
You should look to this function.

http://www.php.net/manual/en/function.touch.php

I think this sentence will help :
If the file does not exist, it is created.

Write me if you want more help