简体   繁体   中英

My php code suddenly can't work in javascript code

This is my code.

在此处输入图片说明

I don't know why it suddenly can't work today. As you see in the image the is light-blue, it should be dark-blue in visual stuido code.

Does anyone having the same issue?

You can try like below.

<?php
    echo "a";
?>
<script>
    alert(1);
    function test()
    {
        alert("<?php echo 1; ?>");
    }
    test();
</script>

Thanks.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM