Read PHP script from...

php.internals

Srdjan Mijanovic

22 years ago
Hello, I'm quite new to this newsgroup, and I hope this is the right place to ask the question. I want to be able to read PHP source files from an archive. Script is not present on the hard disk, but inside a file / archive. To do this, I can supply the zend_stream object for reading and writing. How to integrate this into the ISAPI PHP? The major problem is with INCLUDE function, which always assumes that we're including files from the disk... while the content can come from other sources (archive) Thanks! Regards, Srdjan Mijanovic

Jevon Wright

22 years ago
Well, if you can get the file source out of the archive into a string, you could then eval() it. Hope this helps, Jevon ----- Original Message ----- From: "Srdjan Mijanovic" <msergeo@hotmail.com> To: <internals@lists.php.net> Sent: Saturday, May 08, 2004 5:51 AM Subject: [PHP-DEV] Read PHP script from...
> Hello, > > I'm quite new to this newsgroup, and I hope this is the right place to ask > the question. > > I want to be able to read PHP source files from an archive. Script is not > present on the hard disk, but inside a file / archive. To do this, I can > supply the zend_stream object for reading and writing. > > How to integrate this into the ISAPI PHP? The major problem is with
INCLUDE

Wez Furlong

22 years ago
You want to implement a wrapper for PHP streams: http://www.php-mag.net/itr/online_artikel/psecom,id,368,nodeid,114.html --Wez.

Srdjan Mijanovic

22 years ago
Thanks - the streams seem to be the solution. The basic problem is never with the "main file", but with includes. I will try and let the newsgroup know how this works. Regards, Srdjan Mijanovic