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

在bash中获取正在运行的php脚本的名称

I'm using a sendmail wrapper, but it prints only the path to the folder, not the running PHP script.

Is it possible to get the filename of the PHP script that invoked the shell script?

$(basename $0)

or

$(basename $(readlink -nf $0))

do not work. It shows me the "sendmail" filename.

Thanks.

You can probably try to run: ps aux | grep php

in command line and parse out the name of the file.

近期文章

  • 使用codeigniter的条款和条件
  • 使用php访问远程linux服务器上的oracle DB
  • 重构如果地狱
  • 存储文件的最佳实践[关闭]
  • 如何在今天或昨天或特定日期按日期查看新闻?
  • too long
  • CakePHP URL [Underscore to Hyphen]
  • 我的PHP存在问题
  • 格式化为运动时间的十分之一
  • mysql php android。 从表中删除了所有行,但最后一行仍显示在listview上
  • 在couchDB字段值中存储JSON对象数组
  • 下拉取决于yii框架中的多选下拉列表
  • base64限制没有显示出来
  • 检查对象是否已使用javascript加载数据或替代文本
  • 多维数组:内部数组和内部数组内爆
  • 提取单引号和双引号字符串
  • Php Autocompletion:告诉IDE哪个类是继承的
  • 获取请求时URL中的意外html实体
  • 使用具有指定键名的COUNT_RECURSIVE?
  • 计算一个表并按ORDER BY计算

Copyright ©2022 我爱占星 All Rights Reserved.

浙ICP备2022030071号-1

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

友情链接:代码精华