php cli换行示例
时间:2024-05-03 15:50:59
现有1.php内容如下:
<?php
echo 'hi\nhi';
在命令行中执行该文件:
bash >> php 1.php
hi\nhi
这其中无法换行的原因很简单,把单引号换为双引号即可。
<?php
echo "hi\nhi";
在命令行中执行该文件:
bash >> php 1.php
hi
hi
标签:php,换行
![](/images/zang.png)
![](/images/jiucuo.png)
猜你喜欢
使用OpenCV实现仿射变换—旋转功能
2021-01-20 05:57:48
![](https://img.aspxhome.com/file/2023/2/121042_0s.jpg)
使用Python对Excel进行读写操作
2022-05-25 16:56:32
golang 两个go程轮流打印一个切片的实现
2024-02-12 09:11:29
Vue之插件详解
2024-04-30 10:44:57
![](https://img.aspxhome.com/file/2023/7/130057_0s.jpg)
mysql跨数据库复制表(在同一IP地址中)示例
2024-01-20 00:51:11
将tf.batch_matmul替换成tf.matmul的实现
2021-03-25 03:35:43
![](https://img.aspxhome.com/file/2023/7/124787_0s.jpg)
Django 中使用日志的方法
2022-09-12 11:17:40
![](https://img.aspxhome.com/file/2023/3/101453_0s.png)
python matplotlib绘图,修改坐标轴刻度为文字的实例
2023-09-29 12:27:57
![](https://img.aspxhome.com/file/2023/7/62897_0s.jpg)
Django在Model保存前记录日志实例
2023-10-05 03:01:29
使用pandas实现连续数据的离散化处理方式(分箱操作)
2023-08-28 21:45:51
详解ABP框架中Session功能的使用方法
2024-05-13 09:16:28
![](https://img.aspxhome.com/file/2023/2/126192_0s.png)
MySQL中如何优化order by语句
2024-01-23 09:49:25
![](https://img.aspxhome.com/file/2023/2/77222_0s.png)
Vue keepAlive 数据缓存工具实现返回上一个页面浏览的位置
2024-04-30 10:28:47
MySQL数据同步Elasticsearch的4种方案
2024-01-28 18:10:49
![](https://img.aspxhome.com/file/2023/6/118216_0s.jpg)
MySQL数据库数据删除操作详解
2024-01-13 11:55:42
![](https://img.aspxhome.com/file/2023/4/79134_0s.png)
Python 中 Shutil 模块详情
2022-12-20 15:25:58
![](https://img.aspxhome.com/file/2023/8/128618_0s.jpg)
使用sqlplus连接Oracle数据库问题
2024-01-13 09:25:16
在Vue中使用echarts的方法
2024-06-07 16:01:42
python将红底证件照转成蓝底的实现方法
2023-09-25 19:20:57
![](https://img.aspxhome.com/file/2023/0/125170_0s.png)
python删除字符串中指定字符的方法
2022-12-02 18:32:44