<?php
/**
* Sample code to register an additional service in
* Plesk 10.1 and above.
*
*/
/**
* Use the following instructions to initialize the Plesk PHP
* environment when running command-line PHP script with sw-engine-pleskrun
* utility. On Linux OSes, it resides in /usr/local/psa/bin/.
*
* For Windows servers, use the following command to run the registration script.
* "%plesk_bin%php.exe" -d auto_prepend_file="" "<ABSOLUTE-PATH-TO-SCRIPT>"
*
* Comment the following two lines if you run the PHP script through the Plesk
* web interface.
*/
require_once('api-common/cu.php');
cu::initCLI();
/**
* The following code registers the service that was
* implemented with the servicedir_servicefile class. This class must
* be available for autoloading from Plesk.
*/
Db_Table_Broker::get('PlanItems')->register(
new servicedir_servicefile(),
servicedir_servicefile::getSubjectTypes()
);
- SolutionsBy RoleBy EditionBy CloudPartner ProgramExclusive discounts, benefits and exposure to take your business to the next level
- Product
- Pricing
- Extensions
- Help Center
- More
- FREE TRIAL
Menu
Knowledge Base
Registration of an Additional Service
Related Posts
Knowledge Base
Hosting Wiki
Industry
Partners
PRODUCT
PROGRAMS
COMMUNITY
© 2024 WebPros International GmbH. All rights reserved. Plesk and the Plesk logo are trademarks of WebPros International GmbH.
Managed with with Plesk WP Toolkit