Thanks for the response, but this did not work for me. I found that many solution ideas in the internet, but nothing worked for me.
Now i finally found the solution!
The keyword is popen! This works nice:
$handle = popen ('start /B C:\Data\restart_TS3.bat > C:\Daten\restart_TS3.log 2>&1', 'r');
pclose ($handle);
header("Location:ts3_status.php");
This do following:
popen opens a background process that starts the batch file, output goes to the log file.
Then you need to close it with pclose. (the batch is still running in background)
After that, it opens another website, in my case its a "see current status" website.
If you dont want a log, you can also output (like MarkB told before) with >nul. This would look like that:
$handle = popen ('start /B C:\Data\restart_TS3.bat >nul 2>&1', 'r');
And be careful with empty spaces in the path!
I dont know why, but this will not work:'start /B "C:\Data Folder\restart_TS3.bat" >nul 2>&1'
In that cases you need " in the folder like that:
$handle = popen ('start /B C:\"Data Folder"\restart_TS3.bat >nul 2>&1', 'r');
This works fine with empty space in Folder names.