遇到了同样的问题,并在 Roshana 链接的法语论坛帖子之后修复了它。顺便说一句,即使在修复之后,在线/离线功能也不再起作用。您必须使用虚拟主机将您的本地站点“在线”。
在文本编辑器中打开 C:/wamp64/scripts/refresh.php 并替换以下内容:
// management of online / offline mode
$c_OnOffLine = 'off';
if ($wampConf['status'] == 'online')
{
$tpl = str_replace('images_off.bmp', 'images_on.bmp',$tpl);
$tpl = str_replace($w_serverOffline, $w_serverOnline,$tpl);
$tpl = str_replace('onlineOffline.php on', 'onlineOffline.php off', $tpl);
$tpl = str_replace($w_putOnline,$w_putOffline,$tpl);
$c_OnOffLine = 'on';
}
// management of item put online
if($wampConf['MenuItemOnline'] == 'on') {
$changeServMenu = ';WAMPPUTONLINE
';
$changeServMenu .= <<< EOF
Type: item; Caption: "${w_putOnline}"; Action: multi; Actions: onlineoffline
EOF;
$tpl = str_replace(';WAMPPUTONLINE',$changeServMenu,$tpl);
$changeServMenu = ';WAMPONLINEOFFLINESTART
';
$changeServMenu .= <<< EOF
[onlineoffline]
Action: run; FileName: "${c_phpExe}"; Parameters: "onlineOffline.php on";WorkingDir: "${c_installDir}/scripts"; Flags: waituntilterminated
Action: run; FileName: "${c_phpCli}"; Parameters: "refresh.php";WorkingDir: "${c_installDir}/scripts"; Flags: waituntilterminated
Action: service; Service: ${c_apacheService}; ServiceAction: restart;
Action: resetservices;
Action: readconfig;
EOF;
$tpl = str_replace(';WAMPONLINEOFFLINESTART',$changeServMenu,$tpl);
}
作者:
// management of item put online
if($wampConf['MenuItemOnline'] == 'on') {
$changeServMenu = ';WAMPPUTONLINE
';
$changeServMenu .= <<< EOF
Type: item; Caption: "${w_putOnline}"; Action: multi; Actions: onlineoffline
EOF;
$tpl = str_replace(';WAMPPUTONLINE',$changeServMenu,$tpl);
$changeServMenu = ';WAMPONLINEOFFLINESTART
';
$changeServMenu .= <<< EOF
[onlineoffline]
Action: run; FileName: "${c_phpExe}"; Parameters: "onlineOffline.php on";WorkingDir: "${c_installDir}/scripts"; Flags: waituntilterminated
Action: run; FileName: "${c_phpCli}"; Parameters: "refresh.php";WorkingDir: "${c_installDir}/scripts"; Flags: waituntilterminated
Action: service; Service: ${c_apacheService}; ServiceAction: restart;
Action: resetservices;
Action: readconfig;
EOF;
$tpl = str_replace(';WAMPONLINEOFFLINESTART',$changeServMenu,$tpl);
// management of online / offline mode
$c_OnOffLine = 'off';
if ($wampConf['status'] == 'online')
{
$tpl = str_replace('images_off.bmp', 'images_on.bmp',$tpl);
$tpl = str_replace($w_serverOffline, $w_serverOnline,$tpl);
$tpl = str_replace('onlineOffline.php on', 'onlineOffline.php off', $tpl);
$tpl = str_replace($w_putOnline,$w_putOffline,$tpl);
$c_OnOffLine = 'on';
}
}