Hey bako
Most web hosts has exec() and related functions disabled, but if ur developing on ur local machine then you shuddnt have ne problem.
exec()ing a text file wont open the text editor, it only happens in windows GUI.
try this n see if u get ne output:
<?php
exec('dir *.*',$output);
echo '<pre>';
print_r($output);
echo '</pre>';
?>