[Phpwm] How to create a page on a server from a browser

David Goodwin david at codepoets.co.uk
Mon May 1 12:22:00 BST 2006


Ray Masa wrote:
> Thanks, that worked perfectly.  I love this forum.
> 
> Ray
> 
> 
>> file access is fairly straight forward in PHP - as an example:
>>
>> $outfile = "<b>Some HTML text</b>";
>> $fh = fopen("default.html", 'w') or die("can't create default.html 
>> file");
>> fwrite($fh, $outfile);
>> fclose($fh);
>>
>> will open a file, write the contents of $outfile to the file, and then 
>> close the file or die with an error message if it fails. You can just 
>> tie this in with the submit button. There's an example of this 
>> (loading a config file) at www.monkeysailor.co.uk/scanui/config.php
>>


I'd suggest you use one of the many javascript editors to provide a 
non-html editing interface to save your users from having to know HTML. 
e.g. Kupu or FCKEdit (i think).

David.


-- 
David Goodwin

[ david at codepoets dot co dot uk ]
[ http://www.codepoets.co.uk       ]



More information about the Phpwm mailing list