1 Reply Latest reply on Sep 20, 2007 7:50 PM by Newsgroup_User

    Edit CSS in Textarea

    ready4god2513
      I need to be able to open up a given css file (I have the exact location on the server) in a textarea and edit and then re-save that file. Does anyone know how to do that (I would prefer to stay away from using a database table for this action).
        • 1. Re: Edit CSS in Textarea
          Level 7
          ready4god2513 wrote:
          > I need to be able to open up a given css file (I have the exact location on the
          > server) in a textarea and edit and then re-save that file. Does anyone know
          > how to do that (I would prefer to stay away from using a database table for
          > this action).
          >

          - use <cffile action="read" variable="somevarname"
          file="fullabsolutepathtoyourcssfile"> to read your css into a variable
          (use expandpath() to convert rel path to abs path if needed)
          - populate your textarea with the #somevarname#
          - make necessary chnages
          - use <cffile action="write" file="fullabsolutepathtoyourcssfile"
          output="#form.yourtextareaname#" nameconflict="overwrite"> to save the
          changes

          hth

          --

          Azadi Saryev
          Sabai-dee.com
          http://www.sabai-dee.com