H
H
herelanc2021-02-26 15:08:05
1C-Bitrix
herelanc, 2021-02-26 15:08:05

How to display an image on a self-written Bitrix page?

Here is my code:

<?php
require_once($_SERVER["DOCUMENT_ROOT"]."/bitrix/modules/main/include/prolog_before.php");
CHTTP::SetStatus("Локалея. Сайт временно закрыт на реконструкцию.");
?>

<!doctype html>
<html>
   <head>
      <meta http-equiv="Content-Type" content="text/html;charset=windows-1251">
      <style type="text/css">
         .error {color:#000; margin: 20% auto; font-family:Montserrat, sans-serif; text-align:center; max-width:680px;}
         .error-fon {font-size:240px; font-weight:bold; line-height:240px; color:#f5f5f5; position:absolute; top:-16px; left:50%; margin-left:-200px; z-index:-1;}
         .error-text-top {font-size:30px; margin-top:50px;}
         .error-test-separate {border-top:1px solid #f2f2f2; margin-top:10px;}
         .error-text-bottom {font-size:20px; margin-top:16px;}
      </style>
      <title>503 Service Unavailable</title>
   </head>
   <body>
      <div class="error">
    <img src="/bitrix/php_interface/include/Asset 2.png">
        <div class="error-text-wrap">
           <div class="error-text-top">Сайт закрыт на реконструкцию</div>
           <div class="error-test-separate"></div>
           <div class="error-text-bottom">
              Мы скоро вернёмся с новым форматом доставки. Ждите!  
              <br><br>
           </div>
        	</div>
    </div>
   </body>
</html>


There is a link to the image on the output line and the image itself is displayed if it is simply output via an HTML file and the path to the image on the PC, but it does not want to be displayed in Bitrix. Tell me what could be the problem?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Stalker_RED, 2021-02-26
@herelanc

The problem is in the way, most likely.
open in browser

http://ваш_домен.com/bitrix/php_interface/include/Asset 2.png
displayed?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question