[Date Prev][Date Next][Thread Prev][Thread Next][Interchange by date
][Interchange by thread
]
[ic] Writing to a file other than with Log tag?
Quoting marc.brevoort (marc.brevoort@armazemdedados.com):
> Hello group,
>
> In the project that I'm doing, we need to output generated data to file (in
> this case, the file will contain printable HTML documents). Once in a while,
> it could happen that a file needs to be replaced by a newer version.
>
> As file operations are by default blocked by safe mode, I figured using the
> Log tag to write to file would be a reasonable way to go, but replacing the
> contents of a log file seems a problem.
>
> Is there another way to allow me to have the Interchange server write files,
> without disabling safe mode?
There are two ways.
One is to use the UI-based [write-relative-file ...] tag, which has the
advantage of automatically creating needed directories.
The other is to use the (I believe documented) file spec:
[log file=">the_file" type=text]The stuff.[/log]
--
Mike Heins
Perusion -- Expert Interchange Consulting http://www.perusion.com/
phone +1.513.523.7621 <mike@perusion.com>
If you think nobody cares if you're alive, try missing a couple of
car payments. -- Earl Wilson