Добавил:
Upload Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
ts_tier_2_012010.doc
Скачиваний:
0
Добавлен:
01.07.2025
Размер:
1.25 Mб
Скачать

E) Unsupported ColdFusion Tags

Although this may be a list of unsupported tags, support may vary from partner to partner.

CFCONTENT

CFEXECUTE

CFDIRECTORY

CFFTP

CFOBJECT

CFLOG

CFREGISTRY ***

CFFILE

CFADMINSECURITY

CFLDAP

CFADMINISTRATION

ColdFusion custom tags

CFCHART is not supported for ColdFusion MX

  • *** CFREGISTRY will also affect ColdFusion MX tag CFApplication *if* client storage is left to its default or set to "Registry".

  • Here is a brief explanation and a resolution that was provided by our programming department for ColdFusion MX scenario. At default, the CFApplication tag has a parameter of clientstorage with a default value of Registry. By disabling the CFRegisty tag, this creates a conflict. To resolve the problem, the CFApplicaiton tag MUST include the clientstorage="Cookie" or clientstorage="Datasource_Name" to ensure that CFMX does not try to access the registry. Here is an example of a good CFApplication tag.

<cfapplication name="Your_App_Name" clientmanagement="yes" sessionmanagement="yes" setclientcookies="yes" setdomaincookies="yes" sessiontimeout="#createTimeSpan(0,8,0,0)#" applicationtimeout="#createTimeSpan(0,8,0,0)#" Clientstorage="Cookie" loginstorage="session">

The Following tags will be activated on CFMX 7 only, by sending a request by ticket process to Sys Admin and will take one (1) business day to activate:

  1. CFFile

  2. CFDirectory

F) ColdFusion Error Messages

  • Due to security reasons we have disabled debugging, and have generic error messages setup on our servers. This prevents sensitive information from being displayed to visitors.

  • Customers are advised to fix and debug code, on their development servers before moving to the live system.

G) Custom ColdFusion Tags

  • Custom CFML tags are supported on our systems. However custom CFX/Dlls are prohibited on the hybrid system.

  • Tags that are poorly coded are known to cause server instability, excessive resource consumption, and reduced site performance. For this reason, CFX/Dlls are much better suited to a dedicated server environment.

H) ColdFusion Coding Examples

1. ColdFusion DSN connection for MS ACCESS

<CFQUERY NAME="TableName" DATASOURCE="prefix_domainname_com">

SELECT * FROM TableName

</CFQUERY>

2. ColdFusion DSN connection for MS SQL

<CFQUERY NAME="TableName" DATASOURCE=prefix_domain_com";SERVER=MS SQL.megasqlservers.com;

UID=dbm.domain.com;PWD=password>

SELECT * FROM TableName

</CFQUERY>

3. ColdFusion DSN connection for MySQL

<CFQUERY NAME="TableName" DATASOURCE="prefix_domainname_com" USERNAME="mydomainco123456" PASSWORD="password">

SELECT * FROM TableName

</CFQUERY>

4. ColdFusion DSNless Connection for MS ACCESS

<CFSET thisPath=ExpandPath("data\")>

<CFSET thisDirectory=GetDirectoryFromPath("thisPath")>

<CFQUERY NAME="TableName" DBTYPE="dynamic" CONNECTSTRING="Driver={Microsoft Access Driver (*.mdb)};Dbq=#GetDirectoryFromPath(thisPath)#database.mdb;">

SELECT * FROM TableName

</CFQUERY>

5. ColdFusion DSNless connection for MS SQL

CFQUERY NAME="TableName" DBTYPE="dynamic"

CONNECTSTRING=" Driver={SQL Server};

Server=MS SQL.megasqlservers.com;Database=prefix_domain_com;UID=dbm.domainname.com;

PWD=password;">

SELECT * FROM TableName

</CFQUERY>

6. ColdFusion DSNless connection for MySQL

<CFQUERY NAME="TableName" DBTYPE="dynamic" CONNECTSTRING="Driver={mysql};Server=sqlc1.megasqlservers.com;

Database=prefix_domainname_com;UID=dbm.domain.com;PWD=password;">

SELECT * FROM TableName

</CFQUERY>

7. ColdFusion Defining Paths

This equates to the following path:

\domain.com\public\images

<CFSET thisPath= ExpandPath("images/")> <CFSET thisDirectory= GetDirectoryFromPath(thisPath)>

8. CFMail Example

****HTML Page cfcode.htm****

<html>

<center>

<form action=”cfmail.cfm” method=”POST”>

<table border=0 width=580>

<TR>

<TD>

<font face=arial size=5>ColdFusion <cfmail> form-to-email sample<BR>

</font>

<BR>

<font face=arial size=3>

Here’s the CFMail example. The example below uses ColdFusion script to launch the email message, using ColdFusion server’s built-in email capability.<BR>

<BR> Look at the source code in this HTML page as well as the source code for cfmail.cfm to see what’s going on. To view the source code of the cfmail.cfm file, which is called by this form, click below.

</font>

<!---This is the “to” address (put in your address here)--- >

<input type=text size=40 name=”recipient” value=”( Fill in your email address here.)”>

<!---This is the subject line--- >

<input type=hidden name=”subject” value=”TEST”>

<!--- This is the “from” address--- >

<input type=hidden name=”email” value=”a.sagala@austinsagala.com”>

<input type=hidden name=”Message Text” value=”Here’s more text that will be included in the email message itself, as the body of the message.”>

<input type=”submit” name=”mail” value=”Send Email Message Now”><BR>

<BR>

</form>

</td>

</tr>

</table>

</center>

</HTML>

<cfmail

from=”#form.email#”

to=”#form.recipient#”

subject=”#form. subject#”

Text of message goes here.

Соседние файлы в предмете [НЕСОРТИРОВАННОЕ]