PHP exec() and system() functions always return false in IIS
- by Loftx
Hi there,
I'm trying to use the PHP exec() or system() (or any other similar function) to run a batch file, but I can't seem to get these to return anything.
The simplest example I've seen is this, which outputs nothing:
<?php
echo system('dir');
?>
The script is running on a windows XP machine on IIS with PHP installed and I've also tried it on my shared hosting account running windows 2003 server/IIS.
Can anyone suggest what I need to do to get this working, or provide any commands I can use for troubleshooting?
Cheers,
Tom