Answer the question
In order to leave comments, you need to log in
How all the same to connect a script in header 1C?
A banal task is to connect a js script to the head of a 1C site.
What I did:
in header.php I
added
<?$APPLICATION->AddHeadScript('/bitrix/js/formsrc.js')?> // this is my script
Doesn't work. Climbed into the console - I see the following picture
<?
require($_SERVER["DOCUMENT_ROOT"]."/bitrix/header.php");
$APPLICATION->SetTitle("");
?>
$(document).ready(function(){
console.log('test');
})<?require($_SERVER["DOCUMENT_ROOT"]."/bitrix/footer.php");?>
http screenshot :
// joxi.ru/EA4PVVzco4OlVA Bitrix arbitrarily added
<?
require($_SERVER["DOCUMENT_ROOT"]."
in my script, which is why it is not executed.
Tell me, please, how to be and correctly add the script?
If you add vlob, stupidly in the tag in header.php - it works, but it doesn't seem to be kosher.
Answer the question
In order to leave comments, you need to log in
$params = json_decode(тут переменная , в которой json-строка);
$amount = $params -> accounts[1] -> balance -> amount;
Bitrix did not spontaneously add anything. You took this and for some reason created a script as a page of the site.
Use the code editor or edit the file from the admin panel in PHP mode - the item "Edit as PHP"
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question