cvs: php4 /sapi/cgi cgi_main.c

From: Date: Fri, 03 Nov 2000 09:55:55 +0000
Subject: cvs: php4 /sapi/cgi cgi_main.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-2452@lists.php.net to get a copy of this message
dbeu Fri Nov 3 01:55:55 2000 EDT Modified files: /php4/sapi/cgi cgi_main.c Log: use argv[1] if it's given, thanks to Bob Denny <rdenny@dc3.com> Index: php4/sapi/cgi/cgi_main.c diff -u php4/sapi/cgi/cgi_main.c:1.81 php4/sapi/cgi/cgi_main.c:1.82 --- php4/sapi/cgi/cgi_main.c:1.81 Tue Oct 31 08:16:57 2000 +++ php4/sapi/cgi/cgi_main.c Fri Nov 3 01:55:54 2000 @@ -702,10 +702,14 @@ } if (cgi && !file_handle.handle.fp) { - PUTS("No input file specified.\n"); - php_request_shutdown((void *) 0); - php_module_shutdown(); - return FAILURE; + file_handle.handle.fp = V_FOPEN(argv0, "rb"); + if(!file_handle.handle.fp) { + PUTS("No input file specified.\n"); + php_request_shutdown((void *) 0); + php_module_shutdown(); + return FAILURE; + } + file_handle.filename = argv0; } else if (file_handle.handle.fp && file_handle.handle.fp!=stdin) { /* #!php support */ c = fgetc(file_handle.handle.fp);

« previous php.cvs (#2452) next »