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

如何在linux命令行中使用PHP处理多行参数

php test.php 

I use the above command in the Linux shell environment. It prompts me to input the parameters. I want to input 3 lines of parameters but now it directly executes test.php when I hit enter.

You could use to divide the lines and process the string inside the script to replace them with real line breaks.Example:

<?php
    echo str_replace('
',"
",$argv[1]);
?>

近期文章

  • Restful Web Service无法从实时服务器PHP获取任何数据
  • Wordpress:WP_Query上自定义帖子类型的自定义顺序
  • PHP显示一个ACF帖子,其中包含与其兄弟帖子不同的字段
  • 设置可以安装Web应用程序的最大计算机/服务器数
  • 函数php参数
  • 用户登录显示元素[重复]
  • 如何从这个网址获取参数?
  • 分页codeigniter错误
  • 与php会话的Jquery ajax问题
  • jQuery - Ajax POST似乎不起作用
  • joomla 3x将一个字符串插入sql数据库
  • PHP mysql - 用帖子获取相应的用户
  • SQL查询(select * where)在php中不起作用
  • codeigniter 3上的Mysqli驱动程序无法正常工作[关闭]
  • SQL Query使用notORM php返回零行
  • Laravel为雄辩的插入添加新的数组键
  • 使用融合图表连接数据库(Mysql)
  • 使用XMLWriter从mySql数据库创建XML内容时出错
  • 达到一定数量的相同数字时更改mt_rand()
  • WP帖子只包含一个网址,如何将其转换为链接?

Copyright ©2022 我爱占星 All Rights Reserved.

浙ICP备2022030071号-1

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

友情链接:代码精华