ret"/> ret">
Heim > Artikel > Backend-Entwicklung > Call-time pass-by-reference has been deprecated 有关问题
Call-time pass-by-reference has been deprecated 问题
这是一个获取本地IP的函数
源码如下:
<!--Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->public function winip( ) { @$this->execcmd( "ipconfig /all", &$this->return_array ); if ( $this->return_array ) { return $this->return_array; } $cmdir= $_SERVER['WINDIR']."\\system32\\ipconfig.exe"; if ( file_exists( $cmdir) ) { @$this->execcmd??( $_ocmdir ." /all", &$this->return_array ); } else { @$this->execcmd??( $_SERVER['WINDIR']."\\system\\ipconfig.exe /all", &$this->return_array ); } return $this->return_array; } public function linuxip( ) { @$this->execcmd ( "ifconfig -a", &$this->return_array ); return $this->return_array; } public function execcmd ( $a , $b) { $b=shell_exec($a); }}