比如include('../data/config.php');
然后在config.php中定义$db_name; 但却提示变量未定义的错误
比如这种:
Notice: Undefined variable: db_name in D:\phpStudy\WWW\ec5\admin\includes\init.php
经测试发现,是因为config这个文件的<?php 后面有隐含的特殊字符,要删除或换成空格才行.
比如include('../data/config.php');
然后在config.php中定义$db_name; 但却提示变量未定义的错误
比如这种:
Notice: Undefined variable: db_name in D:\phpStudy\WWW\ec5\admin\includes\init.php
经测试发现,是因为config这个文件的<?php 后面有隐含的特殊字符,要删除或换成空格才行.