Welcome Guest, Not a member yet? Register   Sign In
Debug Toolbar above of the head tag
#3

(02-16-2020, 05:17 AM)jreklund Wrote: Hi, this bug have been reported on GitHub with a suggested solution:
https://github.com/codeigniter4/CodeIgni...ssues/2545

PHP Code:
if (strpos($response->getBody(), '<head>') !== false)
{
    $response->setBody(
        str_replace('<head>''<head>' $script$response->getBody())
    );
    return;



Thank you very much for the reference. Actually I've try to tricky with add <head> before <script> tag and remove after $script variable. But your reference more make sense. Smile

`
PHP Code:
$script '<head>' PHP_EOL
                
'<script .....';

str_replace('<head>'$script ''$response->getBody()); 
Reply


Messages In This Thread
Debug Toolbar above of the head tag - by arnezthe - 02-15-2020, 01:31 PM
RE: Debug Toolbar above of the head tag - by arnezthe - 02-17-2020, 04:19 AM



Theme © iAndrew 2016 - Forum software by © MyBB