Server Time:
Thursday May 15 2008 11:03 PM  
Your Time:
  
HostMySite.Com is sponsoring this tutorial, please visit their site today!
This tutorial is sponsored by HostMySite.Com - ColdFusion Hosting

Displaying Tag Restrictions on ColdFusion Server
by: James Harvey
Email this tutorial to a friend Display Printer Friendly Format
[Download in PDF Format] [Download in FlashPaper Format]

<cfset CFFILEtst =0>
<cfset CFDIRECTORYtst=0 >
<cfset CFCOLLECTIONtst=0>
<cfset CFCONTENTtst=0>
<cfset CFEXECUTEtst=0>
<cfset CFLOGtst=0>
<cfset CFOBJECTtst=0>
<cfset CFOBJECTCACHEtst=0>
<cfset CFREGISTRYtst=0>
<cfset SetProfileStringtst=0>
<cfset CreateObjectCOMtst=0>
<cfset CreateObjectCORBAtst=0>
<cfset CreateObjectJAVAtst=0>

This is the tags we should look for I belive:

   CF tags:
      CFFILE
      CFDIRECTORY
      CFCOLLECTION
      CFCONTENT
      CFEXECUTE
      CFLOG
      CFOBJECT
      CFOBJECTCACHE
      CFREGISTRY

   CF functions:
      SetProfileString
      CreateObject(COM)
      CreateObject(CORBA)
      CreateObject(JAVA)

<style type="text/css">
    <!--
    .No {
        color: #FF0000;
        font-weight: bold;
    }    
    .Yes {
        color: #00CC00;
        font-weight: bold;
    }
    -->
</style>

<cftry>
   <cffile action="write" addnewline=
"yes" charset="utf-8" file="HelloWorld.txt" output="Hello World" fixnewline="no">
   <cfcatch type=
"Any">
      <cfset CFFILEtst =1>
   </cfcatch>
</cftry>

<cftry>
   <CFDIRECTORY directory=
"C:\Sites\dev\dfgdfdfhvcvb" action="create">
   <CFDIRECTORY directory=
"C:\Sites\dev\dfgdfdfhvcvb" action="delete" recurse="no">
   <cfcatch type=
"Any">
      <cfset CFDIRECTORYtst=1>
   </cfcatch>
</cftry>

<cftry>
   <CFEXECUTE name=
"notepad.exe"></CFEXECUTE>
   <cfcatch type=
"Any">
      <cfset CFEXECUTEtst=1>
   </cfcatch>
</cftry>


<table width="150" border="1" cellspacing="2" cellpadding="0">
   <tr>
      <th>
Tag</th>
      <th>
Passed</th>
   </tr>
   <tr>
      <td nowrap>
CFFILE = </td>
      <cfif CFFILEtst IS 1>
         <td class="No">No</td>
      <cfelse>
         <td class="Yes">Yes</td>
      </cfif>
   </tr>
<tr>
   <td nowrap>
CFDIRECTORY = </td>
   <cfif CFDIRECTORYtst IS 1>
      <td class="No">No</td>
   <cfelse>
      <td class="Yes">Yes</td>
   </cfif>
</tr>
<tr>
   <td nowrap>
CFEXECUTE = </td>
   <cfif CFEXECUTEtst IS 1>
      <td class="No">No</td>
   <cfelse>
      <td class="Yes">Yes</td>
   </cfif>
</tr>
</table>


Date added: Thu. March 6, 2008
Posted by: James Harvey | Views: 744 | Tested Platforms: CFMX,CFMX7,CFMX8 | Difficulty: Beginner
Categories Listed: Debugging Error Handling Functions Servers

HostMySite.Com is sponsoring this tutorial, please visit their site today!
This tutorial is sponsored by HostMySite.Com - ColdFusion Hosting

This author's other tutorials:
Dynamically Generating HTML Table Columns & Rows
Dynamically Generate and HTML Table with a Dynamic Number of Columns and rows. - Date added: Thu. April 3, 2008
Please rate this tutorial:
5 Stars 4 Stars 3 Stars 2 Stars 1 Stars
Comments on this tutorial
Read previous comments on this particular tutorial
A few errors
<CFDIRECTORY directory="C:\Sites\dev\dfgdfdfhvcvb" action="create">
<CFDIRECTORY directory="C:\Sites\dev\dfgdfdfhvcvb" action="delete" recurse="no">

Even if cfdirectory worked, it is always going to say it doesnt because ddpjgriwejg doesnt exist.

Louis
Posted by: Louis
Posted on: 04/02/2008 01:38 AM
Post a new comment on this tutorial
post a new comment on this particular tutorial
Your Name:
Your Email:
Comment Title:
Comments:
Key Phrase:
 
Skyscrapper Banner Advertisement
Daily Razor - ColdFusion Hosting

You are 1 of 48 active sessions! | Privacy | Company
Copyright © 2002 EasyCFM.Com, LLC. (Easy ColdFusion Tutorials) All Rights Reserved
All other trademarks and copyrights are the property of their respective holders.
ColdFusion Hosting ColdFusion Hosting
ADD TO:
Blink
Del.icio.us
Digg
Furl
Google
Simpy
Spurl
Y! MyWeb