php 执行shell

时间:2018-10-18 23:00:58   收藏:0   阅读:155

<?php

    $shell "ls -la";
    exec($shell$result$status);
    $shell "<font color=‘red‘>$shell</font>";
    echo "<pre>";
    if$status ){
        echo "shell命令{$shell}执行失败";
    else {
        echo "shell命令{$shell}成功执行, 结果如下<hr>";
        print_r( $result );
    }
    echo "</pre>";
?>

原文:https://www.cnblogs.com/vinzen/p/9813256.html

评论(0
© 2014 bubuko.com 版权所有 - 联系我们:wmxa8@hotmail.com
打开技术之扣,分享程序人生!