Yeah, I have a file browser & editor app, and I can copy & paste an 
upgrade into the edit field and have the program writ to itself. The 
next page that loads is using the new version.

fun.

'course that doesn't help when my site is down :(

-nathan strutz
http://www.dopefly.com/


Ian Skinner wrote:
> Basic Answer: Yes.
> 
> 
> I have a system where a cfm file creates other cfm files just fine.  I see no 
> reason why a file in memory could not re-write the disk version of the file.
> 
> Not sure about how that would affect the compiled version of the file.  But I 
> presume if the admin setting to always check for new versions is on then it 
> will be recompiled the next time the cfm file is requested.
> 
> --------------
> Ian Skinner
> Web Programmer
> BloodSource
> www.BloodSource.org
> Sacramento, CA
>  
> "C code. C code run. Run code run. Please!"
> - Cynthia Dunning
> 
> ....-----Original Message-----
> ....From: Mike Soultanian [mailto:[EMAIL PROTECTED]
> ....Sent: Wednesday, August 03, 2005 1:54 PM
> ....To: CF-Talk
> ....Subject: Can a CF file edit itself?
> ....
> ....I am trying to create a file security system and I have a custom tag
> ....that checks the security settings on a CFM file every time it is
> ....accessed.  So, at the top of the page would be:
> ....
> ....<CF_SECURITYCHECK>
> ....
> ....This tag checks the database to see if the logged-in user has access to
> ....the file and continues loading the page if the user does.  If the user
> ....doesn't have access, the user will be sent to an error page.  Obviously,
> ....to keep track of every file on the system the database needs to have a
> ....unique identifier for each file.  I could use the directory/filename,
> ....but if move a file, that would cause problems because the database would
> ...."lose" the information on that file and permissions would have to be
> ....reset (pain).
> ....
> ....So, what I want to happen is when a CFM page is accessed for the first
> ....time, I want it to edit itself and put in a a unique file identifier
> ....that it will then be stored in the database.  So, for example, it will
> ....take the following:
> ....
> ....<CF_SECURITYCHECK>
> ....
> ....and change it to:
> ....
> ....<CF_SECURITYCHECK FileID="[some randomly generated unique number]">
> ....
> ....I know this may not be possible, but I thought I'd check anyways.
> ....Otherwise, does anyone know how I can identify a file by some unique
> ....characteristic (i.e. checksum maybe)?  It's kinda similar to an NTFS
> ....system where the system knows the permissions on a file regardless of
> ....where it moves to.
> ....
> ....What I would like to avoid is generating my own unique numbers in each
> ....file.  I could do it that way, but I'd like to find a clean and more
> ....automatic way to take care of it.
> ....
> ....Thanks,
> ....Mike
> ....
> ....
> 
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Discover CFTicket - The leading ColdFusion Help Desk and Trouble 
Ticket application

http://www.houseoffusion.com/banners/view.cfm?bannerid=48

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:213672
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to