Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

GodziLaravel's avatar

how to remove this PHP tag ?

Hello , All output pages are prefixed by ´<?php´ !

<?php<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">

    <!-- CSRF Token -
....

also when I :

vagrant@homestead:~/code/crm$ php artisan cache:clear
<?phpApplication cache cleared!
vagrant@homestead:~/code/crm$ php artisan config:clear
<?phpConfiguration cache cleared!
vagrant@homestead:~/code/crm$ art config:clear
<?phpConfiguration cache cleared!
vagrant@homestead:~/code/crm$ php artisan cache:clear
<?phpApplication cache cleared!
vagrant@homestead:~/code/crm$ php artisan config:clear
<?phpConfiguration cache cleared!
vagrant@homestead:~/code/crm$ php artisan view:clear
<?phpCompiled views cleared!
vagrant@homestead:~/code/crm$

How can I correct this ?

0 likes
4 replies
GodziLaravel's avatar

@snapey yes I posted this before sorry but I still not capable to find that file .

do you have any idea how to search it ? i'm using also Gitlab .

thanks

GodziLaravel's avatar

@snapey a big Thanks to you , I found it :

I found one file in ´config/htmlelement.php´ with one single like :

<?php
elgammal's avatar

please check your main/layout:

I think, at first you have created new php file, so it came with its pre-start <?php ant then you just pasted the layout header without removing the tag.

Please or to participate in this conversation.