Home Backend Development PHP Tutorial shell_exec函数输出空白有关问题

shell_exec函数输出空白有关问题

Jun 13, 2016 am 10:27 AM
bat exec liunx shell txt

shell_exec函数输出空白问题
echo shell_exec('dir/d');
在本地(不是IIS,是Nginx)输出没问题,可以输出相关信息。但是到了服务器上(2003+IIS)就不行了,是空白的。
exec('t.bat');
在本地也没问题,到服务器就不行。t.bat是新建一个TXT文件。
服务器上cmd.exe添加了IUSR_*权限的,但是t.bat貌似还是没有执行,因为txt没有新建。


求解~


------解决方案--------------------
shell_exec 执行shell 只能在liunx下用dir 命令 所以在win下执行不了

t.bat是 win下的批量执行 liunx 执行不了
------解决方案--------------------
shell_exec是不是被禁用了。
http://php.net/disable-functions

Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot Article Tags

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

How to install Classic Shell on Windows 11? How to install Classic Shell on Windows 11? Apr 21, 2023 pm 09:13 PM

How to install Classic Shell on Windows 11?

How to use bat batch processing to modify file names in batches How to use bat batch processing to modify file names in batches Sep 19, 2023 am 11:19 AM

How to use bat batch processing to modify file names in batches

Explorer.exe does not start on system startup [Fix] Explorer.exe does not start on system startup [Fix] Jun 03, 2023 am 08:31 AM

Explorer.exe does not start on system startup [Fix]

What to do if php exec cannot be executed What to do if php exec cannot be executed Nov 22, 2022 am 10:16 AM

What to do if php exec cannot be executed

PowerShell deployment fails with HRESULT 0x80073D02 issue fixed PowerShell deployment fails with HRESULT 0x80073D02 issue fixed May 10, 2023 am 11:02 AM

PowerShell deployment fails with HRESULT 0x80073D02 issue fixed

What is Intel TXT? What is Intel TXT? Jun 11, 2023 pm 06:57 PM

What is Intel TXT?

How to quickly delete the line at the end of a file in Linux How to quickly delete the line at the end of a file in Linux Mar 01, 2024 pm 09:36 PM

How to quickly delete the line at the end of a file in Linux

Different ways to run shell script files on Windows Different ways to run shell script files on Windows Apr 13, 2023 am 11:58 AM

Different ways to run shell script files on Windows

See all articles