Go Back   CodingForums.com > :: Server side development > PHP

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 01-03-2013, 12:59 PM   PM User | #1
paperino00
New Coder

 
Join Date: Nov 2011
Posts: 91
Thanks: 2
Thanked 0 Times in 0 Posts
paperino00 is an unknown quantity at this point
cron command

Hello, what does $object is for in this cron command ? will its value be usable in make.php and how ?

thank you

PHP Code:
exec(php_path()." -q ".BASEDIR."/actions/make.php $object &> /dev/null &"); 
paperino00 is offline   Reply With Quote
Old 01-04-2013, 02:09 AM   PM User | #2
Inigoesdr
Super Moderator


 
Inigoesdr's Avatar
 
Join Date: Mar 2007
Location: Florida, USA
Posts: 3,601
Thanks: 2
Thanked 397 Times in 390 Posts
Inigoesdr is a jewel in the roughInigoesdr is a jewel in the roughInigoesdr is a jewel in the rough
Quote:
Originally Posted by paperino00 View Post
Hello, what does $object is for in this cron command ? will its value be usable in make.php and how ?
The value of $object will be inserted in to the command, and you can get to it in make.php by using $argv. For example:
PHP Code:
<?php echo $argv[0]; // outputs what was passed to make.php
Also note that whatever $object is, it should probably be escaped if it hasn't been in the code before the exec() line.
Inigoesdr is offline   Reply With Quote
Old 01-04-2013, 09:49 AM   PM User | #3
paperino00
New Coder

 
Join Date: Nov 2011
Posts: 91
Thanks: 2
Thanked 0 Times in 0 Posts
paperino00 is an unknown quantity at this point
Quote:
Originally Posted by Inigoesdr View Post
The value of $object will be inserted in to the command, and you can get to it in make.php by using $argv. For example:
PHP Code:
<?php echo $argv[0]; // outputs what was passed to make.php
Also note that whatever $object is, it should probably be escaped if it hasn't been in the code before the exec() line.
If there is no $argv inside make.php $output value is useless in this command ?
paperino00 is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 07:38 AM.


Advertisement
Log in to turn off these ads.