PHP语法错误 [英] PHP Syntax Error

查看:118
本文介绍了PHP语法错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

php代码中的错误是什么:


回声我在这里:
?>

what is the bug in php code:


echo i am here :
?>

推荐答案

上面的php标签中的书写不正确.
编写php标签的正确方法是

in the above code php tag is written incorrectly.
the correct way to write php tag is

<? php

// any php code

?>



OR



OR

<?

// any php code

?>



而且echo函数未正确编写.您要在网页上显示的字符串必须放在引号中.

当我们要打印变量的值时,不需要引号.
最后正确编写上面的代码,



also the echo function is not written correctly. the string which you want to be displayed on the web page must be placed in quotes.

quotes are not required when we wants to print value of a variable.
at last correct form of writing the above code,

<?php
echo "i am here";
?>


这篇关于PHP语法错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆