+ 19
Error code in php
There is the error in this question I don't understand why there is error because this code is given by sololearn itself. Then too the question is giving error. Please let me know why there is an error and what should be done so that the code runs. https://code.sololearn.com/wJKkqldJjDeL/?ref=app
10 odpowiedzi
+ 6
piyush singh
<?php
define("MSG", " Hi SoloLearners!");?>
<?=MSG;?>
+ 5
The problem has to do with the case. You used msg instead of MSG, which was defined.
change msg to MSG and you'll be good to go.
+ 4
piyush singh I think it might be because the case insensitive declarations weren't deprecated the time Sololearn published the lesson. The default of constants is false, so you don't have to provide the true parameter.
+ 3
MDKL⚡⚡☁ it's already MSG ..
+ 3
BroFar but why the sololearn's code is wrong ?
As that was the code given by sololearn.
+ 3
piyush singh
depreciated $case_insensitive boolean not recognizing as boolean is not defined properly.
+ 2
The error message clearly says what's wrong with your code.
+ 2
Defense Hack it's not my code already given by sl
+ 1
You think To Make msg us to uppercase
define("MSG", " Hi SoloLearns!");
and
echo MSG
Remove true in your code
0
There are mistakes and lack of explanation, for humans.