# Read PHP script from...

- Thread: https://externals.io/message/9706
- Original archive: https://news-web.php.net/php.internals/9706
- Started by Srdjan Mijanovic on 2004-05-07T17:51:35+00:00
- Messages: 4
- Reply by email to internals@lists.php.net
- More for agents: search with https://externals.io/search.md?q={query} · JSON API at https://externals.io/api · documentation at https://externals.io/llms.txt

---

## #9706 — Srdjan Mijanovic — 2004-05-07T17:51:35+00:00

URL: https://externals.io/message/9706#9706

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

---

## #9721 — Jevon Wright — 2004-05-08T01:26:57+00:00

URL: https://externals.io/message/9706#9721 · In reply to: #9706

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
> 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

---

## #9723 — Wez Furlong — 2004-05-08T02:01:11+00:00

URL: https://externals.io/message/9706#9723 · In reply to: #9706

You want to implement a wrapper for PHP streams:

http://www.php-mag.net/itr/online_artikel/psecom,id,368,nodeid,114.html

--Wez. 

> -----Original Message-----
> From: Srdjan Mijanovic [mailto:msergeo@hotmail.com] 
> Sent: 07 May 2004 18:52
> To: internals@lists.php.net
> 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
> 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

---

## #9779 — Srdjan Mijanovic — 2004-05-10T08:00:15+00:00

URL: https://externals.io/message/9706#9779 · In reply to: #9723

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
