|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2004-08-13 19:21 UTC] wez@php.net
[2004-08-14 05:01 UTC] xuefer at 21cn dot com
[2004-08-14 12:15 UTC] wez@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Fri Oct 24 09:00:01 2025 UTC |
Description: ------------ touch php.ini ./test | grep php.ini -i paramter works but -c not seems those spaces is not convert to '\0' sapi/cli/php_cli.c while ((c = php_getopt(argc, argv, OPTIONS, &php_optarg, &php_optind, 0))!=-1) { switch (c) { case 'c': cli_sapi_module.php_ini_path_override = strdup(php_optarg); /*debug*/ printf("%d %d '%s'\n", (int) php_optarg[0], strlen(php_opt_arg), php_optarg); break; case 'n': cli_sapi_module.php_ini_ignore = 1; break; } } got "32 2 ' .'" seems a problem of the shell if -c is ok to be left broken. -i shouldn't be working too but allowing options in #! is very useful Reproduce code: --------------- #!/usr/bin/php -i -c . // empty file Expected result: ---------------- Configuration File (php.ini) Path => /etc/php.ini Actual result: -------------- Configuration File (php.ini) Path => ./php.ini