ID: 11764
Updated by: sniper
Reported By: [EMAIL PROTECTED]
Status: Feedback
Bug Type: Scripting Engine problem
Operating system:
PHP Version: 4.0.6
Assigned To:
Comments:
User feedback:
--------------
In goods1.php , the value of $argc == 5 (PHP 4.0.6) , $argc == 3 (PHP
4.0.5)
--------------
If you run this script:
test.php:
<?php echo $HTTP_SERVER_VARS["argc"]; ?>
with this command line:
C:\php.exe -q test.php argument1 argument2
what does it print? The result for me on Windows / Linux
when using PHP 4.0.6 is 3.
And have you ever heard of include() ?
--Jani
Previous Comments:
---------------------------------------------------------------------------
[2001-06-27 23:01:09] [EMAIL PROTECTED]
And what is the difference between 4.0.5 system() and 4.0.6 system() ?
---------------------------------------------------------------------------
[2001-06-27 22:51:51] [EMAIL PROTECTED]
<?php
// goods.php
$today = date("Y/m/d");
$mmdd = substr($today, 5, 2) . substr($today, 8, 2) . ".txt";
$cmdstr = "php.exe -q goods1.php " . $today . " " . "2001/06/14/11:37:05" .
" > Y:AutoDialer_MKTREPORTPattayagoods1_" . $mmdd;
echo $cmdstr . "n";
system($cmdstr);
$cmdstr = "php.exe -q goods2.php " . $today . " " . "2001/06/14/11:37:05" .
" > Y:AutoDialer_MKTREPORTPattayagoods2_" . $mmdd;
echo $cmdstr . "n";
system($cmdstr);
?>
<?php
#
# goods1.php
#
function generate_goods1_report($datestr, $camid)
{
$linkid = odbc_connect("FET", "SA", "");
if ($linkid)
{
$sqlstr = "SELECT REP.CALL_DATE, REP.CUS_TELNO1, REP.FIRST_NAME, REP.RFU1
FROM REP_CM00001 REP" .
" WHERE CAMPAIGN_ID = '" . $camid . "'" .
" AND RFU1='1' AND CALL_DATE = '" . $datestr . "'";
$cur = odbc_exec($linkid, $sqlstr);
print "CALL_DATE,CUS_TELNO1,FIRST_NAME,RFU1n";
while (odbc_fetch_row($cur))
{
$field1 = odbc_result($cur, 1);
$field2 = odbc_result($cur, 2);
$field3 = odbc_result($cur, 3);
$field4 = odbc_result($cur, 4);
$datastr = $field1 . "," . $field2 . "," . $field3 . "," .
$field4 . "n";
print $datastr;
}
odbc_close($linkid);
}
} // function
// echo "Into goods1.phpn";
// echo "argc == " . $argc . "n";
if ($argc == 3)
{
generate_goods1_report($argv[1], $argv[2]);
}
else
{
echo "Usage : php.exe -q goods1.php call_date(YYYY/MM/DD) campaign_idn";
}
?>
---------------------------------------------------------------------------
ATTENTION! Do NOT reply to this email!
To reply, use the web interface found at http://bugs.php.net/?id=11764&edit=2
--
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]