File: libtest.php

package info (click to toggle)
bayonne 2.3.2-3
  • links: PTS, VCS
  • area: main
  • in suites: lenny
  • size: 11,180 kB
  • ctags: 3,662
  • sloc: cpp: 38,791; sh: 9,323; ansic: 1,391; makefile: 485; perl: 471; java: 405; cs: 402; php: 354; python: 293
file content (21 lines) | stat: -rwxr-xr-x 675 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#!/usr/bin/php -q
<? 
/* a shame there is no env var to set php include paths externally... */
$include = ini_get('include_path');
$libexec = getenv('SERVER_LIBEXEC');
if(strlen($libexec) > 0) {
	ini_set('include_path', "$include:$libexec");
} else {
	ini_set('include_path', "$include:../scripts");
}
require_once("libexec.php");
$TGI = &new Libexec;
$TGI->print_output("PHP LIBEXEC STARTED\n");
$result = $TGI->speak_phrase("&number 123");
$TGI->send_result($result);
$file1 = $TGI->get_pathname("tmp:edit");
$TGI->print_output("P1 $file1\n");
$file2 = $TGI->get_pathname("temp/edit");
$TGI->print_output("P2 $file2\n");
$TGI->print_output("** TGI RESULT $result\n");  
?>