我爱占星网 我爱占星网
首页
编程
java
php
前端
首页 编程 java php 前端

如何输出确切的字符串“<?php”

I'm new to php, I have not been able to figure out how to output the exact string "<?php" as either an HTML string, outputing from a file (i.e. file_get_contents(blah);), or with echo "<?php"; inside a code segment. I assume it is getting interpreted as the opening of a php code segment because no data is output. Any help would be appreciated.

Should work fine:

<?php

print "<?php";

More likely it's interpreted as an HTML tag, use

header("Content-type: text/plain");

Or replace the < with &lt;.

近期文章

  • 一个关于指针的简单问题
  • arcgis图层显示不完整
  • vs c++ 这个报错怎么改
  • 十六进制中十进制转换问题。
  • 大一新生学c语言出问题
  • 如何重命名或覆盖php功能?
  • java连接redis一直失败
  • Python代码运行错误
  • 关于#int#的问题,如何解决?
  • 如何按sales由大到小排序,删除sales为0的那几行?
  • 初学者关于运算语句位置的问题
  • 不知道代码出现了什么问题
  • 关于ADS的谐波仿真
  • Excel无法删除空格怎么办?
  • windowsbootmanager怎么修复win10
  • 为什么运行后只有黑框没有结果啊
  • php sql中的UPDATE不会更新数据库
  • ccf201903-2二十四点我用暴力破解做的,但是两个程序一个拿到了满分,一个拿到了50分,看了很长时间也没看出问题在哪里,希望有英雄慧眼帮我看一下
  • 请问如何禁用华为手表的右滑返回
  • postman图片验证码处理

Copyright ©2022 我爱占星 All Rights Reserved.

浙ICP备2022030071号-1

部分图文来自网络,如有侵犯您的版权,请告诉我们删除

友情链接:代码精华