- Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathexport.php
More file actions
Latest commit
executable file
·30 lines (20 loc) · 643 Bytes
/
Copy pathexport.php
File metadata and controls
executable file
·30 lines (20 loc) · 643 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
<?php
require_once ('exportfuncs.php');
//print_r($_SERVER);
if(!isset($_SERVER['TERM'])) die('This script can only be run locally, not via the web server.'."\n");
CallFuncByMessage(Message::SCRIPT_START,Null);
set_time_limit(0);
//Open output file
$filename = "export.osm";
if(isset($_SERVER['argv'][1]))
$filename = $_SERVER['argv'][1];
if(end(explode('.', $filename)) == "bz2")
$out = newOutBz2($filename);
else
$out = newOutPlainText($filename);
Export($out);
unset($out);
echo"\n";
//Trigger destructors acts better, rather than letting database handle going out of scope
CallFuncByMessage(Message::SCRIPT_END,Null);
?>