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
https://dev.1c-bitrix.ru/learning/course/index.php?COURSE_ID=43&LESSON_ID=2499 |
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
echo '<script>'; | |
echo 'console.log(' . json_encode($arResult) . ')'; | |
echo '</script>'; |
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
formData = new FormData($('form.filter').get(0)); | |
data = new URLSearchParams(formData).toString(); |
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
$fileMake = CFile::MakeFileArray( | |
$_SERVER['DOCUMENT_ROOT'].'/upload/pdf/Счет компании '.$company_name.'от '.date('d.m.Y H:i').'.pdf', | |
false, | |
false, | |
'' | |
); | |
$fileSave = CFile::SaveFile( | |
$fileMake, | |
'/pdf', |
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
Выборка разделов | |
https://estrin.pw/bitrix-d7-snippets/s/iblock-sectiontable/ | |
Выборка элементов |
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 console_log($data): void | |
{ | |
echo '<script>'; | |
echo 'console.log(' . json_encode($data) . ')'; | |
echo '</script>'; | |
} |
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
https://firstssl.ru/faq/%D1%82%D0%B5%D1%85%D0%BD%D0%B8%D1%87%D0%B5%D1%81%D0%BA%D0%B8%D0%B5-%D0%B2%D0%BE%D0%BF%D1%80%D0%BE%D1%81%D1%8B/%D0%BA%D0%B0%D0%BA-%D0%BA%D0%BE%D0%BD%D0%B2%D0%B5%D1%80%D1%82%D0%B8%D1%80%D0%BE%D0%B2%D0%B0%D1%82%D1%8C-ssl-%D1%81%D0%B5%D1%80%D1%82%D0%B8%D1%84%D0%B8%D0%BA%D0%B0%D1%82-%D0%B2-%D0%BD%D1%83%D0%B6%D0%BD%D1%8B%D0%B9-%D1%84%D0%BE%D1%80%D0%BC%D0%B0%D1%82 | |
Чтобы вы могли без проблем пользоваться SSL-сертификатом на разных платформах и устройствах, иногда требуется изменить его формат. Дело в том, что некоторые форматы лучше подходят для работы с различными видами программного обеспечения. Далее мы расскажем о том, какие форматы бывают, в каких случаях используются и какими способами можно конвертировать один формат сертификата в другой. | |
Форматы сертификатов | |
Существует четыре основных формата сертификатов: | |
PEM — популярный формат используемый Центрами Сертификации для выписки SSL-сертификатов. | |
Основные расширения этого типа .pem, .crt, .cer, .key. В файлах содержатся строки вида |
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
$.ajax({ | |
url: '/local/ajax/inspection.php', | |
type: 'POST', | |
dataType: 'json', | |
data: { | |
id: $(this).attr('data-inspection-id'), | |
func: 'remove' | |
}, | |
complete: function (data) { | |
$(button).attr('data-inspection', 'false'); |
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
<? | |
define('STOP_STATISTICS', true); | |
require_once($_SERVER['DOCUMENT_ROOT'].'/bitrix/modules/main/include/prolog_before.php'); | |
$GLOBALS['APPLICATION']->RestartBuffer(); | |
[ajax code] | |
?> |
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
Недавно потребовалось в интернет-магазине на Битриксе отображать урлы с русскими буквами, например, /catalog/Коллекция_Collection-Name | |
Для этого пришлось подредактировать файл urlrewrite.php и добавить следующее правило: | |
"CONDITION" => "#^/catalog/([a-zA-Z0-9а-яёА-ЯЁ_\\-]+)$#", | |
"RULE" => "SECTION_CODE=$1", | |
"PATH" => "/store/collection.php", | |
Казалось бы, это все. Но нет. Так как сайт работал в кодировке utf-8, то Битрикс нагло игнорировал "узнавание" русских букв. Данная проблема (как и в большинстве случаев) решается установкой флага u. В итоге, правило приобретает такой вид: | |
"CONDITION" => "#^/catalog/([a-zA-Z0-9а-яёА-ЯЁ_\\-]+)$#u", |
NewerOlder