View Single Post
  #5 (permalink)  
Old 06-26-2008, 07:43 AM
sarel sarel is offline
Novice
Join Date: Jun 2008
Posts: 12
iTrader: (0)
sarel is on a distinguished road
Icon13

Ok the shell exec was relative easy, I have a problem with placing in variables so that the shell commands can be dynamic or user driven.

such as the following:

Code:
<?php 
$output = shell_exec('C:/FWTools2.2.1/bin/ogr2ogr -f "$filetype" c:/mygisdata/$postgislayer.$file_ext PG:"host=localhost user=postgres dbname=mdssdata password=database" "$postgislayer" ');

 echo "<pre>$output</pre>";
?>
the Problem:

the echo doesn't seem to "echo" the the variables in the $output string.

I think it might be the way I use quotes around the variables, the quotes are required on the shell command.

Hope someone can help.

Thanks
Sarel

__________________

Digg this Post! Del.Icio.Us this Post! Technorati this Post! Furl this Post! Mister Wong this Post! Newsvine this Post! Spurl this Post! Reddit this Post! Netscape this Post!

Last edited by sarel : 06-26-2008 at 07:45 AM.