久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

<small id='PDIX4'></small><noframes id='PDIX4'>

          <bdo id='PDIX4'></bdo><ul id='PDIX4'></ul>
        <tfoot id='PDIX4'></tfoot>
        <legend id='PDIX4'><style id='PDIX4'><dir id='PDIX4'><q id='PDIX4'></q></dir></style></legend>

        <i id='PDIX4'><tr id='PDIX4'><dt id='PDIX4'><q id='PDIX4'><span id='PDIX4'><b id='PDIX4'><form id='PDIX4'><ins id='PDIX4'></ins><ul id='PDIX4'></ul><sub id='PDIX4'></sub></form><legend id='PDIX4'></legend><bdo id='PDIX4'><pre id='PDIX4'><center id='PDIX4'></center></pre></bdo></b><th id='PDIX4'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='PDIX4'><tfoot id='PDIX4'></tfoot><dl id='PDIX4'><fieldset id='PDIX4'></fieldset></dl></div>

        PHP - 如何讓 Shell 錯誤回顯到屏幕上

        PHP - How to get Shell errors echoed out to screen(PHP - 如何讓 Shell 錯誤回顯到屏幕上)

          • <bdo id='s9A1d'></bdo><ul id='s9A1d'></ul>
            <tfoot id='s9A1d'></tfoot>
            • <legend id='s9A1d'><style id='s9A1d'><dir id='s9A1d'><q id='s9A1d'></q></dir></style></legend>
                <tbody id='s9A1d'></tbody>
            • <small id='s9A1d'></small><noframes id='s9A1d'>

              1. <i id='s9A1d'><tr id='s9A1d'><dt id='s9A1d'><q id='s9A1d'><span id='s9A1d'><b id='s9A1d'><form id='s9A1d'><ins id='s9A1d'></ins><ul id='s9A1d'></ul><sub id='s9A1d'></sub></form><legend id='s9A1d'></legend><bdo id='s9A1d'><pre id='s9A1d'><center id='s9A1d'></center></pre></bdo></b><th id='s9A1d'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='s9A1d'><tfoot id='s9A1d'></tfoot><dl id='s9A1d'><fieldset id='s9A1d'></fieldset></dl></div>
                • 本文介紹了PHP - 如何讓 Shell 錯誤回顯到屏幕上的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

                  問題描述

                  我正在第一次使用 shell_exec().我正在嘗試使用 ffmpeg shell 腳本在我的服務器上轉換一些視頻文件.

                  I am in the process of using shell_exec() for the first time. I am trying to convert some video files on my server using the ffmpeg shell script.

                  當我在瀏覽器中執行以下代碼時,它返回NULL:

                  When I the below code in the browser, it returns NULL:

                  var_dump(shell_exec("ffmpeg -i /var/www/html/sitedomain/httpdocs/tmp/ebev1177.mp4"));
                  

                  但是,當我在終端中運行等效代碼時:

                  However when I run the equivalent code in my terminal:

                  <代碼>>ffmpeg -i/var/www/html/sitedomain/httpdocs/tmp/ebev1177.mp4

                  我得到了一大堆有用的信息,這些信息以錯誤結束必須至少指定一個輸出文件"

                  I get back a whole load of useful information which ends in an error "At least one output file must be specified"

                  為什么沒有將此信息傳遞回我的 PHP 腳本以便我可以將其回顯?

                  Why is this info not being passed back to my PHP script so I can echo it out?

                  推薦答案

                  錯誤數據從目標程序的STDERR流中輸出.您可以通過將 2>&1 附加到命令,通過 shell_exec() 的正常返回字符串訪問錯誤數據,該命令將重定向 STDERRSTDOUT,您當前看到的流:

                  The error data is output from the target program's STDERR stream. You can get access to the error data through the normal returned string from shell_exec() by appending 2>&1 to the command, which will redirect STDERR to STDOUT, the stream that you are currently seeing:

                  var_dump(shell_exec("ffmpeg -i /var/www/html/sitedomain/httpdocs/tmp/ebev1177.mp4 2>&1"));
                  

                  您可能還想看看 proc_open() 這將允許您獲得將 STDINSTDOUTSTDERR 作為三個單獨的流訪問,這可以對目標程序進行更細粒度的控制,以及您如何處理輸入和輸出到它,包括將它們中的任何一個和所有直接重定向到日志文件(如果需要).但請注意,這是一個復雜得多的機制,存在許多陷阱和絆倒危險.

                  You may also want to take a look at proc_open() which will allow you to get access to STDIN, STDOUT and STDERR as three individual streams, which can afford much finer grained control over the target program and exactly how you handle the input and output to it, including redirecting any and all of them directly to a log file if so desired. Be aware though that this is a much more complex mechanism with many pitfalls and tripping hazards.

                  可以在此處找到有關標準流的更多信息.

                  More information on the standard streams can be found here.

                  這篇關于PHP - 如何讓 Shell 錯誤回顯到屏幕上的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!

                  【網站聲明】本站部分內容來源于互聯網,旨在幫助大家更快的解決問題,如果有圖片或者內容侵犯了您的權益,請聯系我們刪除處理,感謝您的支持!

                  相關文檔推薦

                  MySQLi prepared statement amp; foreach loop(MySQLi準備好的語句amp;foreach 循環)
                  Is mysqli_insert_id() gets record from whole server or from same user?(mysqli_insert_id() 是從整個服務器還是從同一用戶獲取記錄?)
                  PHP MySQLi doesn#39;t recognize login info(PHP MySQLi 無法識別登錄信息)
                  mysqli_select_db() expects exactly 2 parameters(mysqli_select_db() 需要 2 個參數)
                  Php mysql pdo query: fill up variable with query result(Php mysql pdo 查詢:用查詢結果填充變量)
                  MySQLI 28000/1045 Access denied for user #39;root#39;@#39;localhost#39;(MySQLI 28000/1045 用戶“root@“localhost的訪問被拒絕)
                    <legend id='Fzdhd'><style id='Fzdhd'><dir id='Fzdhd'><q id='Fzdhd'></q></dir></style></legend>

                    1. <small id='Fzdhd'></small><noframes id='Fzdhd'>

                        <tfoot id='Fzdhd'></tfoot>

                          <i id='Fzdhd'><tr id='Fzdhd'><dt id='Fzdhd'><q id='Fzdhd'><span id='Fzdhd'><b id='Fzdhd'><form id='Fzdhd'><ins id='Fzdhd'></ins><ul id='Fzdhd'></ul><sub id='Fzdhd'></sub></form><legend id='Fzdhd'></legend><bdo id='Fzdhd'><pre id='Fzdhd'><center id='Fzdhd'></center></pre></bdo></b><th id='Fzdhd'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='Fzdhd'><tfoot id='Fzdhd'></tfoot><dl id='Fzdhd'><fieldset id='Fzdhd'></fieldset></dl></div>
                            <tbody id='Fzdhd'></tbody>
                            <bdo id='Fzdhd'></bdo><ul id='Fzdhd'></ul>
                          • 主站蜘蛛池模板: 日日碰狠狠躁久久躁婷婷 | 亚洲一区精品在线 | 午夜羞羞 | 国产精品国产 | 精品毛片| 香蕉av免费| 久久国产精彩视频 | 日韩欧美在线播放 | 日韩三 | 欧美日韩国产在线观看 | 国产精品99久久久久久www | 国产欧美一区二区三区在线看 | 中文字幕一区二区不卡 | 亚洲欧美视频一区 | 亚洲一区二区欧美 | 日韩不卡一区二区三区 | 91精品国产乱码久久久久久久久 | 手机看黄av免费网址 | 91美女在线 | 亚洲精品一区二区 | 久久久久久中文字幕 | 在线免费观看日本 | 91视频www.| 亚洲欧美另类在线观看 | jⅰzz亚洲 | 乱码av午夜噜噜噜噜动漫 | 欧美mv日韩mv国产网站91进入 | 久久精品久久久久久 | 午夜国产羞羞视频免费网站 | 国产精品国产精品国产专区不片 | 91精品无人区卡一卡二卡三 | a级免费观看视频 | 久久久久久国产精品免费免费狐狸 | 色婷婷一区二区三区四区 | 91热爆在线观看 | 国产成人精品午夜视频免费 | 一级特黄网站 | 在线看91 | 久久国产精品一区二区三区 | 亚洲伊人久久综合 | 国产精品美女久久久 |