简体   繁体   English

我有错误:注意:未定义偏移量:C:\\ wamp \\ www \\ index.php在32行,34行,36行,38行的C:\\ wamp \\ www \\ index.php中

[英]I have error:Notice: Undefined offset: 1 in C:\wamp\www\index.php on line 32,on line 34,on line 36,on line 38

preg_match('|phpVersion = (.*)\n|',$wampConfFileContents,$result);
$phpVersion = str_replace('"','',$result[1]);
preg_match('|apacheVersion = (.*)\n|',$wampConfFileContents,$result);
$apacheVersion = str_replace('"','',$result[1]);
preg_match('|mysqlVersion = (.*)\n|',$wampConfFileContents,$result);
$mysqlVersion = str_replace('"','',$result[1]);
preg_match('|wampserverVersion = (.*)\n|',$wampConfFileContents,$result);
$wampserverVersion = str_replace('"','',$result[1]);

From line 31 to line 38, when i open localhost so it will give this error and localhost's color is still yellow. 从第31行到第38行,当我打开localhost时,它将给出此错误,并且localhost的颜色仍然是黄色。 How can I get it green? 如何获得绿色?

It is because of the space in the config-file. 这是因为配置文件中的空间。 I guess when you select another version of Apache, PHP or MySQL in the WAMP-server menu, it changes the config file but removes the space right after the equal sign: mysqlVersion ="5.7.4" should be: mysqlVersion = "5.7.4" 我猜想当您在WAMP服务器菜单中选择另一个版本的Apache,PHP或MySQL时,它会更改配置文件,但会在等号后删除空格:mysqlVersion =“ 5.7.4”应该是:mysqlVersion =“ 5.7。 4"

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 注意:未定义的索引:第63行的C:\\ wamp \\ www \\ chatsystem \\ index.php中的名称 - Notice: Undefined index: name in C:\wamp\www\chatsystem\index.php on line 63 注意:未定义的索引:在第37行的C:\\ wamp \\ www \\ tests \\ Joomla \\ Website \\ index.php中 - Notice: Undefined index: in C:\wamp\www\tests\Joomla\Website\index.php on line 37 注意:未定义的变量:第7行的C:\\ wamp \\ www \\ cbmall \\ index.php中的db_host - Notice: Undefined variable: db_host in C:\wamp\www\cbmall\index.php on line 7 注意:未定义偏移量:1 in C:\\xampp\\htdocs\\index.php 第 5 行 - Notice: Undefined offset: 1 in C:\xampp\htdocs\index.php on line 5 注意:未定义的偏移量:第14行/somepath/index.php中的1 - Notice: Undefined offset: 1 in /somepath/index.php on line 14 PHP错误提示:未定义的索引:第35行的C:\\ wamp \\ www \\ tweetball \\ classes \\ word.class.php中的UserID - Php error Notice: Undefined index: UserID in C:\wamp\www\tweetball\classes\word.class.php on line 35 注意:未定义的索引:第46行的C:\\ wamp \\ www \\ upload.php中的fileToUpload - Notice: Undefined index: fileToUpload in C:\wamp\www\upload.php on line 46 注意:未定义的索引:第164行的C:\\ wamp \\ www \\ blog \\ news.php中的pre - Notice: Undefined index: pre in C:\wamp\www\blog\news.php on line 164 注意:未定义偏移量:0 in C:\\wamp64\\www\\lynda2\\src\\Chatter\\Middleware\\Authentication.php on line 12 - Notice: Undefined offset: 0 in C:\wamp64\www\lynda2\src\Chatter\Middleware\Authentication.php on line 12 未定义索引:在第 4 行输入 C:\\wamp\\www\\submit.php - Undefined index: type in C:\wamp\www\submit.php on line 4
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM