|
Posted by Freebird on 12/06/05 08:42
Tks a lot, you're right, in here is better, but there's a problem, I can
open the file, grab it all, and have all inside a array like this:
$info[0][0] = 'row 1';
$info[1][0] = 'row 2';
$info[2][0] = 'row 3';
But I've done a lot of tests, and can't get that running, how would I place
my array inside this code ?
Tks a lot for your help
Freebird
> function insert_rows ()
> {
> :: blah blah ::
> }
>
>
> # main code at end ..
>
> $arg_rerun = 'rerun'; # Rerun argument value
>
> $args = array ();
>
> if (array_key_exists ('argv', $_SERVER))
> {
> for ($i = count ($_SERVER['argv']); 0 < --$i; )
> {
> $arg = $_SERVER['argv'][$i];
>
> $args[$arg] = 1;
> }
> }
>
> if (! array_key_exists ($arg_rerun, $args))
> {
> $file = __FILE__; # Our absolute path
>
> if (PHP_OS == 'WINNT') # Windows
> {
> proc_close (proc_open ("start /b php $file $arg_rerun",
> array(), $foo));
> }
> else # Unix (e.g. PHP_OS ==
> 'Linux')
> {
> proc_close (proc_open ("php $file $arg_rerun &", array(),
> $foo));
> }
> }
> else
> {
> insert_rows ();
> }
>
> ?>
[Back to original message]
|