note 64258 added to function.iis-add-server
| From: | php-general at lists dot php dot net | Date: | Tue, 11 Apr 2006 01:18:56 +0000 |
| Subject: | note 64258 added to function.iis-add-server | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-107734@lists.php.net to get a copy of this message | ||
Taken from
http://kromann.info/article.php?Id=11062861865960000
Add a server
iis_add_server() is used to add a new web server to IIS. The function takes 7 parameters that are
used to identify and configure the web server.
$strPath is the physical parth to the document root
$strComment is the text that will show up in the management console
$strIp is the IP address the web server will use
$Port is the port number the web server will listen on
$strHost is the host name
$Rights indicates the access rights
$Status indicates the initial status
<?php
/ $Id: iis_add_server.php,v 1.3 2003/05/22 06:42:26 frank Exp $ /
if (!extension_loaded("iisfunc")) {
dl("php_iisfunc.dll");
}
$strPath = "c:\\inetpub\\new site";
$strComment = "My Install Application";
$strIp = "127.0.0.1";
$Port = 80;
$strHost = "localhost";
$Rights = IIS_READ | IIS_SCRIPT;
$State = IIS_STOPPED; // Or IIS_RUNNING
// Make sure the root directoy exists
if (!is_dir($strPath)) mkdir($strPath);
$ServerInstance = iis_add_server($strPath, $strComment, $strIp, $Port, $strHost, $Rights, $State);
echo "New ServerInstance = $ServerInstance\n";
?>
IIS Constants
The IIS extensions defines a number of constants that makes it easier to read and write PHP scripts.
Constants used to define access rights:
IIS_READ
IIS_WRITE
IIS_EXECUTE
IIS_SCRIPT
Constants used to define the script access:
IIS_ANONYMOUS
IIS_BASIC
IIS_NTLM
Constants used to define server status:
IIS_STARTING
IIS_STOPPED
IIS_PAUSED
IIS_RUNNING
----
Server IP: 216.235.15.211
Probable Submitter: 24.82.180.79
----
X-Spam-Status: No, hits=3.1 required=5.0 tests=DATE_MISSING,FROM_NO_LOWER
autolearn=no version=2.64
----
Manual Page -- http://www.php.net/manual/en/function.iis-add-server.php
Edit -- http://master.php.net/note/edit/64258
Del: integrated -- http://master.php.net/note/delete/64258/integrated
Del: useless -- http://master.php.net/note/delete/64258/useless
Del: bad code -- http://master.php.net/note/delete/64258/bad+code
Del: spam -- http://master.php.net/note/delete/64258/spam
Del: non-english -- http://master.php.net/note/delete/64258/non-english
Del: in docs -- http://master.php.net/note/delete/64258/in+docs
Del: other reasons-- http://master.php.net/note/delete/64258
Reject -- http://master.php.net/note/reject/64258
Search -- http://master.php.net/manage/user-notes.php