note 96536 added to function.gethostname

From: Date: Thu, 04 Mar 2010 00:43:23 +0000
Subject: note 96536 added to function.gethostname
Groups: php.notes 
Request: Send a blank email to php-notes+get-166639@lists.php.net to get a copy of this message
It looks like this function isn't available on windows. Here is my code: <?PHP $var = gethostname(); IF ($var===FALSE) { echo "The function ran but no results were returned!"; } ELSE { echo "The function returned a value\n\r"; echo $var; } ?> I received an error: "Fatal error: Call to undefined function gethostname() " ---- Server IP: 69.147.83.197 Probable Submitter: 204.186.81.1 ---- Manual Page -- http://www.php.net/manual/en/function.gethostname.php Edit -- https://master.php.net/note/edit/96536 Del: integrated -- https://master.php.net/note/delete/96536/integrated Del: useless -- https://master.php.net/note/delete/96536/useless Del: bad code -- https://master.php.net/note/delete/96536/bad+code Del: spam -- https://master.php.net/note/delete/96536/spam Del: non-english -- https://master.php.net/note/delete/96536/non-english Del: in docs -- https://master.php.net/note/delete/96536/in+docs Del: other reasons-- https://master.php.net/note/delete/96536 Reject -- https://master.php.net/note/reject/96536 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#166639) next »