PHP怎么 使用全局变量

WBOY
Release: 2016-06-13 12:42:16
Original
1083 people have browsed it

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 />
Copy after login



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

PHP 全局变量
Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!