...

View Full Version : php create new file



shocker
03-13-2008, 04:19 PM
Well the easiest way for me to explain was to create an images so :

http://img442.imageshack.us/img442/7623/phphelpcp5.gif

im not even sure if this is possible :P
but please help

rafiki
03-13-2008, 04:45 PM
mkdir()? (http://www.php.net/mkdir)

mic2100
03-13-2008, 04:48 PM
u need to do sumthing like this...



<?
$handle = fopen($_POST['filename'], "w+");
$content = "<?php include('header.txt'); ?> More Content <?php include('footer.txt'); ?>";

fwrite($handle, $content);

fclose($handle);
?>


That is basicly what you require you may want to check out the function on www.php.net for more information.

Pennimus
03-13-2008, 04:48 PM
There is also plenty of information on creating a new file here - http://www.google.co.uk/search?q=Create+A+New+File+Using+PHP



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum