Re: Reimplementing .phps

From: Date: Thu, 26 Sep 2002 15:55:59 +0000
Subject: Re: Reimplementing .phps
References: 1  Groups: php.dev 
Request: Send a blank email to php-dev+get-88630@lists.php.net to get a copy of this message
This would work fine, IMHO (although I was told that it wasn't worth it by somebody). I'll implement it in this way and create another patch... maybe it'll be usable :) Devon Zeev Suraski wrote:
In order to fix the backwards dependencies issues, as well as simplify the implementation of phps, I suggest to ditch the existing implementation of x-httpd-php-source, and replace it with an almost-regular PHP request. Instead of reading the code from request_info.path_translated, we would generate a buffer that contains something along the lines of the following code: <?php switch ($_GET["mode"]) {
    case "regular":
        highlight_file(%s);
        break;
    case "lineno":
        highlight_file(%s, 1);        // or whatever is necessary
        break;
} ?> where %s is request_info.path_translated, and execute it using eval_string(). It would greatly simplify the implementation and make it much more easy to change/maintain. Comments? Zeev


« previous php.dev (#88630) next »