i am trying to tie together some php programs, using php-gtk2 for a non-html system. i have a login script that upon successful login sends you to the main page. i cannot for the life of me figure out how one launches an external application, in this case from the login script to the main-page.
i have used shell_exec, exec, proc_open, pcntl_exec ... no luck.
could someone point me in the right direction for solving this conundrum?
any help would be greatly appreciated.
jim s.
launching external applications
Started by scrubber, Jul 09 2010 02:52 PM
4 replies to this topic
#1
Posted 09 July 2010 - 02:52 PM
|
|
|
#2
Posted 09 July 2010 - 03:37 PM
The problem is that you are using PHP-GTK2. Building a desktop application in PHP is like building a house with toothpicks. Sure it's possible, but its just dumb. That being said, why are you trying to execute a script?
#3
Posted 10 July 2010 - 04:27 AM
hi john
reason being i have about 300 (lost count) php scripts that download and process data from the web ... using curl. originally i planed to execute them from the command line. this has turned into a nightmare and i was hoping to use php-gtk to make using these scripts easier. the reason for php-gtk is that it is a relative of php and i should be able to transfer any knowledge of php to php-gtk.
any suggestions for a different way to go would be appreciated.
thanks
jim s.
reason being i have about 300 (lost count) php scripts that download and process data from the web ... using curl. originally i planed to execute them from the command line. this has turned into a nightmare and i was hoping to use php-gtk to make using these scripts easier. the reason for php-gtk is that it is a relative of php and i should be able to transfer any knowledge of php to php-gtk.
any suggestions for a different way to go would be appreciated.
thanks
jim s.
#4
Posted 10 July 2010 - 11:36 AM
Perhaps I am missing something, but why can't you just include() the files, and call the necessary functions? But to answer your original question, both shell_exec and exec should work.
script.php
test.php
output
script.php
echo "Hello, World\n";
test.php
echo shell_exec("php script.php");
output
> php test.php Hello, World! >
#5
Posted 13 July 2010 - 10:56 AM
john;
thanks for the examples. shell_exec works fine. i have no idea why it did not work for me a few weeks back. in any event ... thanks for the suggestion. sometimes i get the detailed stuff ... no problem but am completely thrown off course on the simple stuff.
thanks again
jim s.
thanks for the examples. shell_exec works fine. i have no idea why it did not work for me a few weeks back. in any event ... thanks for the suggestion. sometimes i get the detailed stuff ... no problem but am completely thrown off course on the simple stuff.
thanks again
jim s.


Sign In
Create Account

Back to top









