home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World 2003 March
/
PCWorld_2003-03_cd.bin
/
Software
/
Vyzkuste
/
phptriad
/
phptriad2-2-1.exe
/
util
/
mysql.php
< prev
next >
Wrap
PHP Script
|
2002-02-15
|
1KB
|
31 lines
<?php
function mysqld($action) {
if ($action == "start") {
print("Starting MySQL<br>");
system("c:\apache\mysql\bin\mysqld --standalone") or die ("<br><a href=\"index.html\">Back to Index</a>");
print("MySQL Started<br><a href=\"index.html\">Back to Index</a>");
}
elseif ($action == "stop") {
print("Stopping MySQL Service<br>");
system("c:\apache\mysql\bin\mysqladmin shutdown") or die ("<br><a href=\"index.html\">Back to Index</a>");
print("MySQL Stopped<br><a href=\"index.html\">Back to Index</a>");
}elseif ($action == "start-nt") {
print("Starting MySQL Service<br>");
system("c:\apache\mysql\bin\mysqld-nt --standalone") or die ("<br><a href=\"index.html\">Back to Index</a>");
print("MySQL Stopped<br><a href=\"index.html\">Back to Index</a>");
}elseif ($action == "stop-nt") {
print("Stopping MySQL Service<br>");
system("c:\apache\mysql\bin\mysqladmin shutdown") or die ("<br><a href=\"index.html\">Back to Index</a>");
print("MySQL Stopped<br><a href=\"index.html\">Back to Index</a>");
} else {
print("No action to perform");
}
}
mysqld($action);
?>