Home >Backend Development >PHP Tutorial > PHP怎么 使用全局变量

PHP怎么 使用全局变量

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOriginal
2016-06-13 12:42:161139browse

PHP如何 使用全局变量

<br />
<?php<br />
global $vfp_oledb_CString;<br />
$vfp_oledb_CString="Provider=VFPOLEDB.1;Data Source=d:/testoledb; Collating Sequence=MACHINE";<br />
testgol();<br />
<br />
function testgol(){<br />
echo $vfp_oledb_CString;<br />
}<br />



结果是没有任何输出, 应该如何定义和使用全局变量呢

PHP 全局变量
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn