මචංල තව පොඩි අවුලක් තියෙනව මෙන්න මේකයි අවුල.
if_top.php file
if_bottom.php file
දැන් ඔය ෆයිල් දෙකම index.php file එක ඇතුලේ Include '' use කරල call කරල තියෙනව.
Index.php file
නමුත් මචං Index.php file එක run කරාම.
Parse error: syntax error, unexpected end of file in
කියල error එකක් එනව.
මේකට හේතුව මම දන්නව මෙතනදි වෙලා තියෙන්නේ if block ඒව කෑලි දෙකකට කැඩිල file දෙකකින් Import වෙන නිසා.
මට ඕන මේක වැඩ කරන විදියට හදාගන්න.
if_top.php file
PHP:
<?php
$name = 'GT9';
if ($name=='GT9') {
echo 'hello GT9';
if_bottom.php file
PHP:
<?php
} else {
echo 'who the heck are u?';
}
දැන් ඔය ෆයිල් දෙකම index.php file එක ඇතුලේ Include '' use කරල call කරල තියෙනව.
Index.php file
PHP:
<?php
echo 'hello';
include 'if_top.php';
include 'if_bottom.php';
නමුත් මචං Index.php file එක run කරාම.
Parse error: syntax error, unexpected end of file in
කියල error එකක් එනව.
මේකට හේතුව මම දන්නව මෙතනදි වෙලා තියෙන්නේ if block ඒව කෑලි දෙකකට කැඩිල file දෙකකින් Import වෙන නිසා.
මට ඕන මේක වැඩ කරන විදියට හදාගන්න.


mama code eka wenath widiyakata liyala wade goda daagaththa.