RE: [PHP] exec() Error
| From: | Wei, Alice J. | Date: | Wed, 25 Jun 2008 19:53:13 +0000 |
| Subject: | RE: [PHP] exec() Error | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-275950@lists.php.net to get a copy of this message | ||
_______________________________________
From: Per Jessen [per@computer.org]
Sent: Wednesday, June 25, 2008 3:47 PM
To: php-general@lists.php.net
Subject: Re: [PHP] exec() Error
Wei, Alice J. wrote:
> I have got a task from my client asking me to build something
> that allows the variables in the PHP file passed to another
> PHP file or a file in a different computer language to perform
> some operations on another remote machine. According to my
> client, he calls this behind the scenes to avoid users screw
> up the front end, and I am hoping that I can produce one
> single script, and have it execute some script without the
> user pushing any button. Has anyone tried using exec()
> successfully in PHP to execute files from PHP or other
> programming languages? For example, C, Python, or Perl.
Yeah, that's no big deal. That's what exec() does.
> I have tried this by putting in
>
> exec("http://www.mysite.com/calculate.php");
Well, "http://www.mysite.com/calculate.php" is
not an executable. Try
this instead:
exec("php <path>/calculate.php");
I just found out that using cURL in my script allows me to call script from machine to machine. It
turned out perfectly. Thanks to all who have been helping me with this!
Alice
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php