Run PHP function inside Bash (and keep the return in a bash variable)

后端 未结 7 1887
故里飘歌
故里飘歌 2020-12-29 14:35

I am trying to run a PHP function inside Bash... but it is not working.

#! /bin/bash

/usr/bin/php << \'EOF\'

EOF
         


        
相关标签:
7条回答
  • 2020-12-29 15:20
    PHP_OUT=`php -r 'echo phpinfo();'`
    echo $PHP_OUT;
    
    0 讨论(0)
提交回复
热议问题