> -----Original Message----- > From: Per Jessen [mailto:per@xxxxxxxxxxxx] > Sent: Thursday, June 26, 2008 1:11 AM > To: php-general@xxxxxxxxxxxxx > Subject: RE: Re: exec() Error > > Boyd, Todd M. wrote: > > >> > >> Well, "http://www.mysite.com/calculate.php" is not an executable. > >> Try this instead: > >> > >> exec("php <path>/calculate.php"); > > > > I still don't think this is how exec() should be used when executing > > remote PHP scripts via HTTP, since the web server is not going to > give > > you the underlying code simply because you're calling the URL from > PHP > > and not your web browser. User-Agent tags do not a secure connection > > make. > > That's not what Alice asked for though. She did mention that a remote > call would be made somewhere, but her question was: > > >Has anyone tried using exec() successfully in PHP to execute files > from > >PHP or other programming languages? For example, C, Python, or Perl. > > And that works just fine using exec(). Well... if she was trying to execute *LOCAL* PHP code from within a PHP script that was already running (which she was not), why would you suggest that she use exec() instead of include()? I think the issue has been obfuscated. Nevertheless, she's on the right track to making her program do what she wants to. Win-win. Todd Boyd Web Programmer