php exec returns less results than entering into command line directly

后端 未结 1 947
攒了一身酷
攒了一身酷 2021-01-16 20:34

I have an exec command that is behaving differently than the same command given to linux through Penguinet.

 $res = exec(\'cd /mnt/mydirectory/; zcat log_fil         


        
相关标签:
1条回答
  • 2021-01-16 21:03

    try this:

    exec('cd /mnt/mydirectory/; zcat log_file.gz', $res);
    print_r($res);
    
    0 讨论(0)
提交回复
热议问题