Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php $name = $_FILES['fichier']['name']; $db = pg_connect('host=localhost port=5432 dbname=gisdb user=postgres >password=******'); $output =shell_exec("raster2pgsql -a -s 32629 -I -C -F -M '".$_FILES["fichier"]["tmp_name"]."' eau_param_hydro | psql -U postgres -d gisdb -h localhost -p 5432 "); $req = exec(" SELECT * FROM '".$output."' ");
- $result = pg_query($db,"INSERT INTO eau_param_hydro(rast,filename) >VALUES('".$req."','".$name."');");
- if (!$result) {
- $errormessage = pg_last_error();
- echo "Error with query: " . $errormessage;
- exit();
- } pg_close(); ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement