将[datapath]之类的改成['datapath']确实可以取消这些提示,但这是什么原因呢?就是未定义吗? 怎么加入'就没事了呢 还有: Notice: Undefined index: password in e:\www\html\shop\config.php on line 41 这又是什么提示呢?如何改?
因为[datapath]没有引号,PHP先以常量来处理datapath,而后发现它并不是一个常量,就以一个字符串来处理~~~虽然能正确处理,但是PHP还是会抛出一个NOTICE警告你~~~出现Notice: Undefined index: password in e:\www\html\shop\config.php on line 41 是因为你的数组没有password这个索引....增加了就是了
php.ini中error_reporting = E_ALL & ~E_NOTICE
或在程序开头加上:
error_reporting(E_ALL & ~E_NOTICE);但这并不能解决根本问题,根据你的情况。需要在php.ini中设置
register_globals=on
register_globals=on又是做什么的呢?
怎么加入'就没事了呢
还有:
Notice: Undefined index: password in e:\www\html\shop\config.php on line 41
这又是什么提示呢?如何改?
是因为你的数组没有password这个索引....增加了就是了