shahrzad khorrami wrote:
Hi,
I have two php scripts, first one must pass arguments to second(the php
script that will take more time to process for example inserting 1000000
records to db, data come from first script). I search around web and find
below function:
function execInBackground($path, $exe, $additional) {
global $conf;
if (file_exists($path . $exe)) {
chdir($path);
if (substr(php_uname(), 0, 7) == "Windows"){
echo 'going Windows';
pclose(popen("start \"bla\" \"" . $exe . "\" " . $additional,
"r")); } else {
exec("./" . $exe . " " . $additional . " > /dev/null
&"); }
}
}
But I don't know how to pass variables to the second file? and how to use of
this function?
in *windows* enviroment... and return value of second file to first..
Thanks in advance
shahrzad
after following your recent threads, can I ask have you considered using
the tools made available by the db? something like
LOAD DATA LOCAL INFILE '/importfile.csv'
INTO TABLE test_table
FIELDS TERMINATED BY ','
LINES TERMINATED BY '\n'
(field1, filed2, field3);
this will be 100x faster than anything you can write with php
regards!
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php