Re: Reimplementing .phps

From: Date: Tue, 24 Sep 2002 23:35:28 +0000
Subject: Re: Reimplementing .phps
References: 1  Groups: php.dev 
Request: Send a blank email to php-dev+get-88576@lists.php.net to get a copy of this message
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?
Smart idea for phps implementation :) +1 -- Yasuo Ohgaki

« previous php.dev (#88576) next »