[英]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.