Re: Phar as part of the include_path?

From: Date: Sun, 17 Feb 2008 21:14:11 +0000
Subject: Re: Phar as part of the include_path?
References: 1 2  Groups: php.pecl.dev 
Request: Send a blank email to pecl-dev+get-5119@lists.php.net to get a copy of this message
thanks for the details! So my understanding is that the goal is (only) to provide self contained application deployment but not libraries?
Not necessarily. You can include a phar in a PHP script... include paths work within the phar, and most (all?) libraries have some toplevel file that calls on other files lower down the tree. In that particular test archive, 'index.php' includes a file 'b/c.php', and the content of 'b/c.php' (a simple echo statement) is displayed accordingly wherever index.php is the startfile. The only thing I'm not sure of there is whether index.php should be the startfile when included from a PHP script in a web context, since it isn't the startfile if the phar is loaded directly into the browser. But I haven't tried packaging apps or libraries yet, so I'm probably missing something basic here (like, maybe this is _why_ an included phar acts that way.) - Steph
thanks, - Markus


« previous php.pecl.dev (#5119) next »