ID:               32611
 Updated by:       [EMAIL PROTECTED]
 Reported By:      dj_oldfield at yahoo dot com
-Status:           Open
+Status:           Bogus
 Bug Type:         Feature/Change Request
 Operating System: MANY
 PHP Version:      4.3.10
 New Comment:

.


Previous Comments:
------------------------------------------------------------------------

[2005-04-06 23:17:18] dj_oldfield at yahoo dot com

Description:
------------
I currently work with 4.3 because I have trouble getting phpMyAdmin to
work with 5.x.

In regular development environments ( and as a contract developer ) I
frequently work on code that is intended to run a development
environment and a live environment.  In doing so, many of the files
that I use are interacting with a different directory structure.  To
fully take advantage of the NIX based advantages... file based
templates are a MUST... especially with PHPs automatic formatting of
strings ( WHICH IS REALLY COOL FROM A PROGRAMMERS PERSPECTIVE! ).  

The problem is... that filesystem functions require full knowledge of
the working specifications of the filesystem... which for the moment...
I am actually making a script to auto-fix.  I think that it would be
nice to have new versions of require, include, and file_get_contents
functions which are configured directly to the root directory for the
website... E.G.

include_from_root
require_from_root
file_get_contents_from_root

where the root directory is scanned from it's contents.  I fear that
writting wrapper functions would be in poor convention and could create
erroneos results, so I wanted to take this idea to the source. 
Considering that many people are using PHP on a hosted source... it
would stand to reason that this functionality would make php code more
portable... and therefore enable easier handling of php scripts.

Finally... include_path would be different on a per-site basis.  Can
you make it so that php can watch for "WEBSITE ROOT DIRECTORIES" having
their own php.ini file?  This way... hosted solutions would be better
able to cater to a more open work environment.

Reproduce code:
---------------
// the desired code:
include_from_root( '_includes/some_file.php' );
require_from_root( '_includes/some_other_file.php' );
$file_text = file_get_contents_from_root( '_includes/source_file' );
//... code here
print( $file_text );

Expected result:
----------------
// in hopes to return data from:::
this text came from
/usr/websites/www.website.com/_htdocs/_includes/some_file.php
this text came from
/usr/websites/www.website.com/_htdocs/_includes/some_other_file.php
this text came from
/usr/websites/www.website.com/_htdocs/_includes/source_file.php

Actual result:
--------------
// NOT APPLICABLE


------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=32611&edit=1

Reply via email to