phoenixg 发表于 2011-8-17 15:36:31

求助一个文件引用问题


app/helpers/
               phpmailer/
                           class.phpmailer.php
                           class.pop3.php
                           class.smtp.php
                MY_phpmailer_helper.php

我在MY_phpmailer_helper.php里:
require("./phpmailer/class.phpmailer.php");

为什么提示:
A PHP Error was encountered

Severity: Warning

Message: require(./phpmailer/class.phpmailer.php) : failed to open stream: No such file or directory

Filename: helpers/MY_phpmailer_helper.php

Line Number: 2

jeongee 发表于 2011-8-17 15:46:54

路径不对,请看index.php
看其中的常量

小提示:FCPATH,APPPATH,BASEPATH

phoenixg 发表于 2011-8-17 15:59:51

jeongee 发表于 2011-8-17 15:46 static/image/common/back.gif
路径不对,请看index.php
看其中的常量



搞不懂,为什么去掉./就好了

visvoy 发表于 2011-8-17 17:45:48

"./"是getcwd(),你可以echo getcwd()就知道为啥不行了
页: [1]
查看完整版本: 求助一个文件引用问题