MACROMEDIA COLDFUSION 4.5-ADMINISTRING COLDFUSION SERVER Technické informace Strana 36

  • Stažení
  • Přidat do mých příruček
  • Tisk
  • Strana
    / 174
  • Tabulka s obsahem
  • ŘEŠENÍ PROBLÉMŮ
  • KNIHY
  • Hodnocené. / 5. Na základě hodnocení zákazníků
Zobrazit stránku 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:
Zobrazit stránku 35
1 2 ... 31 32 33 34 35 36 37 38 39 40 41 ... 173 174

Komentáře k této Příručce

Žádné komentáře