FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » Only Allow exec in CLI
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Re: Only Allow exec in CLI [message #179198 is a reply to message #179196] Tue, 25 September 2012 11:41 Go to previous messageGo to previous message
Tim Streater is currently offline  Tim Streater
Messages: 328
Registered: September 2010
Karma:
Senior Member
In article <k3s4f8$6ni$1(at)news(dot)albasani(dot)net>,
The Natural Philosopher <tnp(at)invalid(dot)invalid> wrote:

> Mo. I still have to write all the exec() calls.
>
> Consider the case. I have 4 programs I want to run serially under a
> cron script
>
> I set up the script like this
>
> #!/bin/sh
> program1
> program2
> program3
> program4
>
> Now tell me what else I have to add to make that run under php.
>
> Or why on earth I would want to.

If it's as simple as that there's prolly no point. Mind you, I'd prolly
still do it in PHP because I wouldn't be aware that you can run an
executable in a script just by giving its name; I avoid all knowledge of
shell scripting.

And, are you saying that programs 1, 2, 3, and 4 always run successfully
and don't have any failure modes? No checking of result codes required
or error handling needed?

In your case you have 4 lines of code and run 4 executables. In my app I
have some 11,500 lines of PHP and still run just the 4 executables.

--
Tim

"That excessive bail ought not to be required, nor excessive fines imposed,
nor cruel and unusual punishments inflicted" -- Bill of Rights 1689
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Advice for Literature on PHP-Based Web Development Business Models
Next Topic: Count how many times a value occurs in an array
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Sun Nov 24 10:34:21 GMT 2024

Total time taken to generate the page: 0.04911 seconds