Answer the question
In order to leave comments, you need to log in
Powershell+PHP. How to run a script in PHP?
Good afternoon.
I study the interaction of Php with Powershell
I try on the simplest script:
<?php
$query = shell_exec("powershell.exe -File E:\test.ps1");
echo $query;
?>
Answer the question
In order to leave comments, you need to log in
You may have an error while executing the command, for example, the shell is disabled for security reasons, and error output is not enabled, which results in a "white sheet". Try turning on error display before the code:
error_reporting(E_ALL);
ini_set('display_errors', 1);
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question