为什么我使用echo输出HelloWorld会输出一堆符号?
php吧
全部回复
仅看楼主
level 12
如题,使用echo输出helloworld但是变成了helloworld";?>
这是怎么回事?
2021年03月11日 09点03分 1
level 12
并且还要加上<p>和</p>才能正常输出,不然输出不了[阴险]
2021年03月11日 09点03分 2
level 5
查看网页源代码
2021年03月11日 09点03分 3
看下楼下
2021年03月11日 10点03分
@洛克人杰洛 看你代码咋写的?
2021年03月11日 10点03分
@芈芈ai ?怎么了?我是照着runoob上抄的[乖]
2021年03月11日 10点03分
@洛克人杰洛 哦哦哦哦哦,你这根本就没有在php环境下执行,所以你怎么写的就都会原样输出。php的代码只有在php环境下才可以运行
2021年03月11日 11点03分
level 12
???
2021年03月11日 10点03分 4
level 12
2021年03月11日 10点03分 5
不是这样访问的,用网址访问,不用直接打开静态页面
2021年03月14日 09点03分
你是初学的吗,貌似我初学的时候也犯过这样的错误。里面有php代码,就要经过php解析。用wamp,或者phpstudy 工具,来做本地开发学习
2021年03月14日 09点03分
level 7
每句结束加分号!!!
2021年03月14日 09点03分 7
加了也一样啊
2021年03月14日 09点03分
我也是学过c的[汗]
2021年03月14日 09点03分
@洛克人杰洛 去掉</P>,或进行转义
2021年03月14日 09点03分
level 7
echo 'hello world';
2021年03月14日 09点03分 8
level 7
QQ 64326440
2021年03月15日 06点03分 9
level 3
你这是html了,要搭php环境了访问
2021年03月15日 23点03分 10
懂了
2021年03月16日 04点03分
level 3
可以用phpstudy,访问路径一般是:localhost/项目名/文件名.php
2021年03月15日 23点03分 11
level 1
有PHP代码的文件不能直接打开
2021年03月16日 01点03分 12
1