Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Imrpove create scripts

  • Loading branch information...
commit 5253ae09106615fba85332aba9e045e4e69ad923 1 parent a4ddf9c
@helgi authored
View
2  autoload/create.php
@@ -3,7 +3,7 @@
die("Phar is in read-only mode, try php -d phar.readonly=0 autoload/create.php\n");
}
-@unlink('project.phar');
+@unlink(__DIR__ . '/project.phar');
$p = new Phar('project.phar', 0, 'project.phar');
$p->buildFromDirectory(__DIR__);
View
4 cli/create.php
@@ -3,8 +3,8 @@
die("Phar is in read-only mode, try php -d phar.readonly=0 cli/create.php\n");
}
-@unlink('project.phar');
-$p = new Phar('project.phar', 0, 'project.phar');
+@unlink(__DIR__ . '/project.phar');
+$p = new Phar(__DIR__ . '/project.phar', 0, 'project.phar');
$p->buildFromDirectory(__DIR__);
$stub = <<<'EOD'
View
11 combo/create.php
@@ -3,7 +3,8 @@
die("Phar is in read-only mode, try php -d phar.readonly=0 combo/create.php\n");
}
-$p = new Phar('project.phar', 0, 'project.phar');
+@unlink(__DIR__ . '/project.phar');
+$p = new Phar(__DIR__ . '/project.phar', 0, 'project.phar');
$p->buildFromDirectory(__DIR__);
$stub = <<<'EOD'
@@ -14,10 +15,4 @@
include "phar://" . __FILE__ . DIRECTORY_SEPARATOR . "cli.php";
__HALT_COMPILER();
EOD;
-$p->setStub($stub);
-
- Phar::interceptFileFuncs();
- Phar::mungServer(array('REQUEST_URI', 'PHP_SELF', 'SCRIPT_NAME'));
- Phar::WebPhar(null, 'web.php');
- include "phar://" . __FILE__ . DIRECTORY_SEPARATOR . "cli.php";
- __HALT_COMPILER();
+$p->setStub($stub);
View
4 example2/create.php
@@ -3,7 +3,7 @@
die("Phar is in read-only mode, try php -d phar.readonly=0 example2/create.php\n");
}
-@unlink('project.phar');
-$p = new Phar('example2/project.phar');
+@unlink(__DIR__ . '/project.phar');
+$p = new Phar(__DIR__ . '/project.phar', 0, 'project.phar');
$p['awesome.php'] = '<?php
echo "Hi Phar people! :-) Example 2\n";';
View
4 example3/create.php
@@ -3,6 +3,6 @@
die("Phar is in read-only mode, try php -d phar.readonly=0 example3/create.php\n");
}
-@unlink('project.phar');
-$p = new Phar('example3/project.phar', 0, 'project.phar');
+@unlink(__DIR__ . '/project.phar');
+$p = new Phar(__DIR__ . '/project.phar', 0, 'project.phar');
$p->buildFromDirectory(__DIR__);
View
2  phpmyadmin/phpmyadmin.php
@@ -3,7 +3,7 @@
die("Phar is in read-only mode, try php -d phar.readonly=0 phpmyadmin.php\n");
}
-@unlink('phpmyadmin.phar');
+@unlink(__DIR__ . '/phpmyadmin.phar');
$a = new Phar(__DIR__ . '/phpmyadmin.phar', 0, 'phpmyadmin.phar');
$a->buildFromDirectory("phpMyAdmin-3.4.9-english");
$a->startBuffering();
View
4 web/create.php
@@ -3,8 +3,8 @@
die("Phar is in read-only mode, try php -d phar.readonly=0 web/create.php\n");
}
-@unlink('project.phar');
-$p = new Phar('project.phar', 0, 'project.phar');
+@unlink(__DIR__ . '/project.phar');
+$p = new Phar(__DIR__ . '/project.phar', 0, 'project.phar');
$p->buildFromDirectory(__DIR__);
$stub = <<<'EOD'
Please sign in to comment.
Something went wrong with that request. Please try again.