|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #14710 Please either change include/require/virtual directive, or create new one!
Submitted: 2001-12-27 01:13 UTC Modified: 2002-01-28 21:21 UTC
Avg. Score:3.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:1 (100.0%)
From: nospamo at nospamo dot com Assigned:
Status: Not a bug Package: Feature/Change Request
PHP Version: 4.0.6 OS:
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: nospamo at nospamo dot com
New email:
PHP Version: OS:


 [2001-12-27 01:13 UTC] nospamo at nospamo dot com
I have been searching the forums, bug tracker, etc for a way to do the following, and perhaps misread the "virtual" php operator, but in any case:

Php needs to include SSI functionality in regards to using relative paths on files being included, eg:

If I have a php file, "$HOME/htdocs/static/header.php", and have a tree structure below "htdocs", I cannot find a legit way to include header.php in a relative fashion, eg "include /header.php".  "../../../../header.php" or "/full/path/to/header.php" are not solutions I am looking for :)

That being said, "virtual" seems to encompass what I am looking to do at a cursory glance, but i'm concerned that I may lose some functionality down the road.  From the current manual on the "virtual" function:

"virtual() cannot be used to include a document which is itself a PHP file."

Please, please, PLEASE either create a new directive/option:
 (<? php ssi("/static/header.php") ?>

... or modify the existing ones.

If virtual *is* intended to be the fix, please update the documentation as it is either outdated or misleading (to me anyhew :)

Basically, I need full php functionality *AND* the ability to include other php files in a fully relative nature (EXACTLY like SSI is currently implemented).


Further diags:

If I try the following:

<?php include ("/static/header.php"); ?>

I get:

Warning: Failed opening '/static/header.php' for inclusion (include_path='.:/web/htdocs/user/static') in /web/htdocs/user/index.php on line 0


Add a Patch

Pull Requests

Add a Pull Request

PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Jul 23 18:01:30 2024 UTC