MACROMEDIA COLDFUSION 4.5-ADMINISTRING COLDFUSION SERVER Información técnica Pagina 36

  • Descarga
  • Añadir a mis manuales
  • Imprimir
  • Pagina
    / 174
  • Tabla de contenidos
  • SOLUCIÓN DE PROBLEMAS
  • MARCADORES
  • Valorado. / 5. Basado en revisión del cliente
Vista de pagina 35
31
CONFIGURING AND ADMINISTERING COLDFUSION 9
Using the ColdFusion Administrator
Last updated 2/21/2012
Use the Administrator API
1 Instantiate administrator.cfc:
<cfscript>
// Login is always required.
adminObj = createObject("component","cfide.adminapi.administrator");
Note: You can instantiate administrator.cfc and call the login method in a single line of code, as the following
example shows:
createObject("component","cfide.adminapi.administrator").login("admin");
Note: You can log in as a user other than administrator, but with proper permissions, as follows. Provide the user
name after the password.
createObject("component","cfide.adminapi.administrator").login("#password#","#username#")
2 Call the administrator.cfc login method, passing the ColdFusion Administrator password or the RDS password:
adminObj.login("admin");
3 Instantiate the desired CFC:
myObj = createObject("component","cfide.adminapi.debugging");
4 Call the desired CFC method (this example enables debugging):
myObj.setDebugProperty(propertyName="enableDebug", propertyValue="true");
Examples
The following example adds a SQL Server data source:
Vista de pagina 35
1 2 ... 31 32 33 34 35 36 37 38 39 40 41 ... 173 174

Comentarios a estos manuales

Sin comentarios