Jump to content
Сайт в скором времени будет недоступен ×

Как дебажить модули front и admin?


TemKa_SD
 Share

Recommended Posts

Здравствуйте. Я хочу вывести переменную на экран при заходе в модуль приложения. Если в файлах .tpl всё понятно:

{{echo "<pre>";}}
{{print_r($var);}}
{{echo "</pre>";}}
{{exit;}}

Как работать с print_r в php файлах модулей?

Link to comment
Share on other sites
1 минуту назад, Павел сказал:

Привет. В php файлах работает такая же конструкция:


echo "<pre>";
print_r($var);
echo "</pre>";

 

Неа, не хочет. 

Screenshot_2.jpg

Screenshot_1.jpg

Link to comment
Share on other sites
5 часов назад, Павел сказал:

Почему бы не попробовать как указано в примере?

Там вообще была ошибка синтаксиса, писало что не хватает скобки ) хотя всё правильно было. Это из-за тегов pre так было.

Попробовал так сейчас:

$var = "123";
echo "<pre>";
print_r($var);
echo "</pre>";

ничего не вывело.

Edited by TemKa_SD
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...

Important Information

By using our site you agree to our Privacy Policy