Hi every one,
I've .Fet file I need to put (running) it into FET program by the PHP, How I can do it? I using SUSE 11.2!!
Other question how I can running FET by the terminal?
I need your help, thanks ::)
Quote
Other question how I can running FET by the terminal?
I can only answer this question, which is easy for me. Open konsole, cd to the fet executable directory and type ./fet
Thanks for your help, that is great :) but how I can put it into php code OR How I can run Fet by PHP code?
[size=9]xxxx@linux-jlb7:~/fet-5.14.2> ./fet --inputfile=Hopwood.fet[/size]
Maybe you could search the Internet for running executables by PHP or javascript. If you find the answer to your question, please let us know in this thread.
I would suggest you to upgrade your FET to the latest version, it is not difficult.
These days, I trying to read about exec and other PHP functions, Inshallah I'll tell you if everything is OK.
Thanks for your help and for FET's update :)
Assalam,
Alhamdulillah :) the problem is solved with exec(), and fet is running in the php background correctly :), AND I have seen instructors' tables which were produced.....
Must to be do:
1- After compile FET command line version.
2- putting your program fet, input file such as: Hopwood.fet and your php code under /srv/www/htdocs/
The PHP code:
<?php
'xhost +local:apache'; //Give permission for apache to use x server
if (exec("export DISPLAY=:0 && ./fet --inputfile=Hopwood.fet
--outputdir=hema 2> /tmp/error.log") )
{
//exec("export DISPLAY=:0 && ./fet --inputfile=Hopwood.fet
--outputdir=hema 2> /tmp/error.log");
echo "done" ;
}
?>
4- after that open your browser and write localhost/php_file.php, then you can see your outputs :)
exec (): Execute an external program
'xhost +local:apache' and DISPLAY=:0 to give permission for apache to use x server.
PS: you can do this command in terminal for give xserver permission xhost +local:apache.
Mahioo,helped me a lot ::)
Good luck!