MFB: Allow using syntax highlighting in fastcgi mode

This commit is contained in:
foobar 2007-04-15 23:02:05 +00:00
parent fd9af91146
commit 0439662815

View File

@ -1172,8 +1172,10 @@ int main(int argc, char *argv[])
bindpath = strdup(php_optarg);
}
break;
case 's': /* generate highlighted HTML from source */
behavior = PHP_MODE_HIGHLIGHT;
break;
}
}
php_optind = orig_optind;
php_optarg = orig_optarg;
@ -1456,10 +1458,6 @@ consult the installation file that came with this distribution, or visit \n\
no_headers = 1;
break;
case 's': /* generate highlighted HTML from source */
behavior = PHP_MODE_HIGHLIGHT;
break;
case 'v': /* show php version & quit */
no_headers = 1;
if (php_request_startup(TSRMLS_C) == FAILURE) {
@ -1660,6 +1658,9 @@ consult the installation file that came with this distribution, or visit \n\
if (open_file_for_scanning(&file_handle TSRMLS_CC) == SUCCESS) {
php_get_highlight_struct(&syntax_highlighter_ini);
zend_highlight(&syntax_highlighter_ini TSRMLS_CC);
if (fastcgi) {
goto fastcgi_request_done;
}
fclose(file_handle.handle.fp);
php_output_teardown();
}