File:
[ELWIX - Embedded LightWeight unIX -] /
embedaddon /
php /
ext /
zlib /
tests /
gzopen_include_path.inc
Revision
1.1.1.1 (vendor branch):
download - view:
text,
annotated -
select for diffs -
revision graph
Tue Feb 21 23:48:05 2012 UTC (13 years, 2 months ago) by
misho
Branches:
php,
MAIN
CVS tags:
v5_4_3elwix,
v5_4_29p0,
v5_4_29,
v5_4_20p0,
v5_4_20,
v5_4_17p0,
v5_4_17,
v5_3_10,
HEAD
php
<?php
$pwd = getcwd();
$f = basename(__FILE__);
$dir1 = $pwd."/".$f.".dir1";
$dir2 = $pwd."/".$f.".dir2";
$dir3 = $pwd."/".$f.".dir3";
//invalid directory
$dir4 = $pwd."/".$f.".dir4";
$newdirs = array($dir1, $dir2, $dir3);
$reldirs = array("dir1", "dir2", "dir3");
function generate_next_rel_path() {
global $reldirs;
//create the include directory structure
$pathSep = ":";
$newIncludePath = "";
if(substr(PHP_OS, 0, 3) == 'WIN' ) {
$pathSep = ";";
}
foreach($reldirs as $newdir) {
$newIncludePath .= $newdir.$pathSep;
}
return "dir4".$pathSep . $newIncludePath;
}
function generate_next_path() {
global $newdirs, $dir4;
//create the include directory structure
$pathSep = ":";
$newIncludePath = "";
if(substr(PHP_OS, 0, 3) == 'WIN' ) {
$pathSep = ";";
}
foreach($newdirs as $newdir) {
$newIncludePath .= $newdir.$pathSep;
}
return $dir4.$pathSep . $newIncludePath;
}
function create_include_path() {
global $newdirs;
//create the include directory structure
$pathSep = ":";
$newIncludePath = "";
if(substr(PHP_OS, 0, 3) == 'WIN' ) {
$pathSep = ";";
}
foreach($newdirs as $newdir) {
mkdir($newdir);
$newIncludePath .= $newdir.$pathSep;
}
return $newIncludePath;
}
function relative_include_path() {
global $reldirs;
//create the include directory structure
$pathSep = ":";
$newIncludePath = "";
if(substr(PHP_OS, 0, 3) == 'WIN' ) {
$pathSep = ";";
}
foreach($reldirs as $newdir) {
mkdir($newdir);
$newIncludePath .= $newdir.$pathSep;
}
return $newIncludePath;
}
function teardown_include_path() {
global $newdirs;
// remove the directory structure
foreach($newdirs as $newdir) {
rmdir($newdir);
}
}
function teardown_relative_path() {
global $reldirs;
// remove the directory structure
foreach($reldirs as $newdir) {
rmdir($newdir);
}
}
?>
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>