Jako serweru używam xampplite-win32-1.4.12-pl1. Pisze kod który czyta z rejestru systemowego informacje o systemie, wszystko niby działa dobrze. Ale Gdy podam komukolwiek linka, to osoba nie widzi na owej stronce informacji o swoim systemie a o serwerze. Czy coś robie żle? może coś jest z apachem nie tak?
Kod
<?php
$WshShell = new COM("WScript.Shell");
function regRead($key) {
global $WshShell;
return $WshShell->RegRead($key);
}
function regWrite($key, $value, $type = 'REG_SZ') {
global $WshShell;
return $WshShell->RegWrite($key, $value, $type);
}
$regKey = "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows";
$regKey .= (strcasecmp("winnt", PHP_OS) == 0) ?
' NT\CurrentVersion' : '\CurrentVersion';
echo regRead($regKey.'\ProductName');
echo regRead($regKey.'\ProductKey');
echo regRead($regKey.'\RegisteredOwner');
echo regRead($regKey.'\Version');
?>
$WshShell = new COM("WScript.Shell");
function regRead($key) {
global $WshShell;
return $WshShell->RegRead($key);
}
function regWrite($key, $value, $type = 'REG_SZ') {
global $WshShell;
return $WshShell->RegWrite($key, $value, $type);
}
$regKey = "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows";
$regKey .= (strcasecmp("winnt", PHP_OS) == 0) ?
' NT\CurrentVersion' : '\CurrentVersion';
echo regRead($regKey.'\ProductName');
echo regRead($regKey.'\ProductKey');
echo regRead($regKey.'\RegisteredOwner');
echo regRead($regKey.'\Version');
?>
Pozdrawiam.