Код |
---|
#!/usr/bin/php <?php $_SERVER["DOCUMENT_ROOT"] = "/home/hosting/www"; $DOCUMENT_ROOT = $_SERVER["DOCUMENT_ROOT"]; define("NO_KEEP_STATISTIC", true); define("NOT_CHECK_PERMISSIONS", true); set_time_limit(0); define("LANG", "ru"); require($_SERVER["DOCUMENT_ROOT"]."/bitrix/modules/main/include/prolog_before.php"); //ваш код... require($_SERVER["DOCUMENT_ROOT"]."/bitrix/modules/main/include/epilog_after.php"); ?> |
Цитата |
---|
Константин Кожевин пишет:
Например в папке в корне сайта /testcron/ |
Код |
---|
<?php $_SERVER["DOCUMENT_ROOT"] = "/home/hosting/www"; $DOCUMENT_ROOT = $_SERVER["DOCUMENT_ROOT"]; define("NO_KEEP_STATISTIC", true); define("NOT_CHECK_PERMISSIONS", true); set_time_limit(0); define("LANG", "ru"); require($_SERVER["DOCUMENT_ROOT"]."/bitrix/modules/main/include/prolog_before.php"); //ваш код... require_once($_SERVER["DOCUMENT_ROOT"]."/bitrix/modules/мой_модуль/admin/parse_xml.php"); require($_SERVER["DOCUMENT_ROOT"]."/bitrix/modules/main/include/epilog_after.php"); ?> |
Код |
---|
<? $_SERVER["DOCUMENT_ROOT"] = "/www/fgshop/www/htdocs/"; $DOCUMENT_ROOT = $_SERVER["DOCUMENT_ROOT"]; define("NO_KEEP_STATISTIC", true); define("NOT_CHECK_PERMISSIONS", true); define("LANG", "ru"); require_once("/www/fgshop/www/htdocs/bitrix/modules/main/include/prolog_before.php"); define('LOG_FILENAME', '/www/fgshop/www/htdocs/rememberLog.txt'); set_time_limit(0); if(!defined("B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED!==true)die(); global $USER; if(!is_object($USER)){ $USER = new CUser; } if(CModule::IncludeModule('iblock') && CModule::IncludeModule("sale") && CModule::IncludeModule("catalog")){ // my code } AddMessage2Log($reportLog, ''); require_once("/www/fgshop/www/htdocs/bitrix/modules/main/include/epilog_after.php"); ?> |