• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Edit CSS in Textarea

New Here ,
Sep 20, 2007 Sep 20, 2007

Copy link to clipboard

Copied

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).
TOPICS
Advanced techniques

Views

278

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Sep 20, 2007 Sep 20, 2007

Copy link to clipboard

Copied

LATEST
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

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Documentation