You are here: Re: cron jobs « PHP Programming Language « IT news, forums, messages
Re: cron jobs

Posted by Steve on 05/18/07 16:17

thanks...i did google and found that shortly after posting the question. i
was hoping to find that there was php function that defined the run-time env
a bit more elegantly though. however, it does solve the problem.

thanks again.


"Toby A Inkster" <usenet200703@tobyinkster.co.uk> wrote in message
news:2es0i4-8oj.ln1@ophelia.g5n.co.uk...
| Steve wrote:
|
| > 1) can parameters be given to a script being run through the cli on a
| > cron,
|
| Yes. Google: PHP argv argc
|
| > or 2) is there a method available to a php script that allows the
| > detection of whether it is a cli operation or http?
|
| <?php
| echo (isset($_SERVER['argv'][0]) ? 'Command line' : 'Apache');
| ?>
|
| --
| Toby A Inkster BSc (Hons) ARCS
| http://tobyinkster.co.uk/
| Geek of ~ HTML/SQL/Perl/PHP/Python/Apache/Linux

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация