Skip to content

Instantly share code, notes, and snippets.

@aktaumag
Created April 2, 2023 22:54
Show Gist options
  • Save aktaumag/cba3036a2dba666cb2d4140077e8f42d to your computer and use it in GitHub Desktop.
Save aktaumag/cba3036a2dba666cb2d4140077e8f42d to your computer and use it in GitHub Desktop.
Подмена кода после генерации страницы
Подмена кода после генерации страницы
@aktaumag
Copy link
Author

aktaumag commented Apr 2, 2023

В корневом файле index.php после объявления всяких глобальных переменных и редиректов
Добавляем такой код:

function wscallback($buffer)
{
    return (str_replace('old-code', 'new-code', $buffer));
}

ob_start("wscallback");

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment