S
S
SeiLove2016-06-08 11:36:28
PHP
SeiLove, 2016-06-08 11:36:28

Where are simple functions added in Bitrix?

Good afternoon! I can't figure out something so simple. Suppose we have an elementary function

function F1 ($a) {
$c=$a+5; 
//при чём даже возвращать ничего не требуется
}

Accordingly, we call it like this in the index:
$a=5;
F1($a);

As a result, the function is called and works, but the site crashes! The same thing happens if you move the function to init.php.
Can anyone tell me if in Bitrix such ordinary functions are displayed in some special place? Or are they registered in some other way? I would be grateful for links to documentation... (search usually gives me all sorts of module functions, etc., something more complicated than I think...)

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexey Ukolov, 2016-06-08
@SeiLove

The function in init.php should work fine.
Moreover, since the function itself works for you, then the matter is in it itself or in something else. Look at the logs, if they are not there - turn it on and see, everything will be written there.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question