hi
i have a vb application an to invoke it in a php page i used
exec('app.exe');
but before this statement i have a lot of echo statements
but when the page is loaded the echo statements are not displaying and the application is running and when i exit from it the echo statements are displayed.
echo "swapna";
echo "aladdin"
exec('app.exe');
when i run this
first the app.exe is running and when it is exited the aove echo statements are displaying

but i want to display the echo statements first

anyone know the solution
plz help

thank u very much

<?php
echo "hi";
ob_flush();
flush();
exec("taskmgr.exe");
?>

This works !

thank u

<?php
echo "hi";
ob_flush();
flush();
exec("taskmgr.exe");
?>

This works !

but its not working for the first time
if i reload the same page then its ok but when i try to run it for the first time its not showing the echo statements

Umm..strange! I haven't used much of exec's. Lets see if someone else has an answer..

use shell_exec:

echo "hi";
ob_flush();
 flush();
$output = shell_exec("taskmgr.exe");;
echo $output;

hi
i used shell_exec
and its solved
the new problem is if i click anywhere on the php page other than the form the form disappears from the page and appears on the desktop
is there any solution for this

thank u very much

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.