Saving to a file after editing

  •  06-09-2009, 12:55 AM

    Saving to a file after editing

    1. <?php include_once("CuteEditor_Files/include_CuteEditor.php") ;   
    2.     $editor=new CuteEditor();  
    3.     $editor->ID="Editor1";  
    4.     $editor->EditorBodyStyle="font:normal 12px arial;";  
    5.     $editor->EditorWysiwygModeCss="php.css";  
    6.     $editor->FilesPath="CuteEditor_Files";  
    7.     $editor->LoadHTML("language/enHome.inc");  
    8.     $editor->SaveFile("language/enHometwo.inc");  
    9.     $editor->Draw();  
    10.     $editor=null;  
    11.     //use $_POST["Editor1"]to catch the data   
    12. ?> 
               
    above is my sample code, almost straight from the cute help files.
    this is my first attempt at using cuteeditor for php
     
    as you can see i am loading a file "language/enHome.inc"
    and expecting it to save to a file "language/enHome2.inc"
     
    there content of the file is not code, it's just simple html.... a few <h1 /> <p></p> etcs around some text.
     
    what should i expect to happen when i click the SAVE icon.
     
    does it acutally save the file to the server, or am i expected to grab it and save it myself somehow.
     
    needless to say it isn't saving to the new file.  i've set practically all my folders and files to have permission 777 just in case.. although i don't like doing that if i don't need too.
     
    should i be seeing a 'your file has been saved' type dialog? anything to say something happened?
     
    if so, please point to an appropriate round trip example.
     
    regards,
    al
     
     
     
     
View Complete Thread