MACROMEDIA COLDFUSION 4.5-ADMINISTRING COLDFUSION SERVER Technical Information Seite 36

  • Herunterladen
  • Zu meinen Handbüchern hinzufügen
  • Drucken
  • Seite
    / 174
  • Inhaltsverzeichnis
  • FEHLERBEHEBUNG
  • LESEZEICHEN
  • Bewertet. / 5. Basierend auf Kundenbewertungen
Seitenansicht 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:
Seitenansicht 35
1 2 ... 31 32 33 34 35 36 37 38 39 40 41 ... 173 174

Kommentare zu diesen Handbüchern

Keine Kommentare