[pmwiki-devel] read, edit and save a page

Guillermo Calderon - INCO calderon at fing.edu.uy
Fri Nov 17 08:57:54 CST 2006


Patrick R. Michaud wrote:
> On Tue, Nov 14, 2006 at 06:18:32PM -0200, Guillermo Calderon - INCO wrote:
> 
>>I want to write php code to do the following:
>>
>>  1) read  a page (by name) and store it in a variable (say $text)
>>  2) modify $text (I known how to do this)
>>  3) save the page with $text as the new content
> 
> 
>        $page = ReadPage($name)
>        $text = $page['text'];
>        # ...
>        $text = modify($text);    # you do this part
>        # ...
>        $newpage = $page;
>        $newpage['text'] = $text;
>        UpdatePage($name, $page, $newpage);
> 
> Pm

Thanks all for your answers.
Pm, I cant't find the function "UpdatePage". Where is it?
(I'm using pmwiki 2.1.24)




More information about the pmwiki-devel mailing list