Выдает ли file_get_contents http-вызов или замедляет загрузку страницы?Php

Кемеровские программисты php общаются здесь
Ответить
Гость
 Выдает ли file_get_contents http-вызов или замедляет загрузку страницы?

Сообщение Гость »


I apparently cannot find informations about this topic. I use

Код: Выделить всё

file_get_contents()
quite often to load svg files in my websites (logos, icons..).
I sometimes wonder if that can slow down my pages. I mean, as opposite to directly paste svg markups into the html body.
The browser console doesn't see those svg files in the netword section. So I guess that

Код: Выделить всё

file_get_contents()
doesn't issue http request, and that sounds pretty natural since it's php and thus reads the fiels before compiling the page, and thus no http call should be issued. Ok.
Still, it has some way to read the file and write it in page. Does that slow down the page load or compilation (I mean, if done several times per page, several

Код: Выделить всё

file_get_contents
calls per page).


Источник: https://stackoverflow.com/questions/781 ... -page-load
Ответить

Быстрый ответ

Изменение регистра текста: 
Смайлики
:) :( :oops: :roll: :wink: :muza: :clever: :sorry: :angel: :read: *x)
Ещё смайлики…
   
К этому ответу прикреплено по крайней мере одно вложение.

Если вы не хотите добавлять вложения, оставьте поля пустыми.

Максимально разрешённый размер вложения: 15 МБ.

Вернуться в «Php»