mirror of
https://github.com/php/php-src.git
synced 2025-01-11 05:24:49 +08:00
MFB: Allow using syntax highlighting in fastcgi mode
This commit is contained in:
parent
fd9af91146
commit
0439662815
@ -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();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user