>Can you not use ODBC to connect to the Progress database? It will probably
>be simpler than an exec() call... but anyway if your Progress script is
>returning data that PHP needs to parse then try using passthru() instead...
Thanks! i'll try passthru() right now.

<?php
require_once("webdoc_cfg.php");
$fname="D:/htdocs/p/php_test_make_res.p";
$p_code_test='{utils.i}
writeln("<?php"). 
writeln("$zzz=42;").
writeln("echo ~"in PROGRESS zzz=$zzz~";").
writeln("?>").';
if(!$fp = fopen($fname, 'w')) 
{
        print "Cannot open file ($fname)";
        exit;
}
if (!fwrite($fp,$p_code_test)) 
{
        print "Cannot write to file ($fname)";
        exit;
}
fclose($fp);
passthru($_pro.' -U ******** -P ********* -p '.$fname,$pro_code2);
echo "zzz=$zzz";
?>

hm... it does not work! 
output of command called with passthru() is NOT parsed by PHP.
so i get in my browser just the same bla-bla that my PROGRESS script
generates:
==========================
<?php
$zzz=42;
echo "in PROGRESS zzz=$zzz";
?>
zzz=
==========================> from browser's "view source"
Of course i can use ODBC. But ODBC driver for PROGRESS seems to be a really
odd and slow thing.

-- 
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to