0
打開流我一個簡單的方法include
得到這個錯誤:在使用本未能在PHP
Warning: include(/home/content/70/8352870/html/sites/mysite.com/preview/wp-content/themes/site-theme/mail/class.phpmailer.php)
[<a href='function.include'>function.include</a>]: failed to open stream: No such file or directory in /home/content/70/8352870/html/sites/mysite.com/preview/wp-content/themes/site-theme/mail/send-message.php on line 5
我已經包含在文件:
<?php
$path = getcwd();
include $path.'/class.phpmailer.php';
?>
我得到了同樣的錯誤,而無需使用getcwd
方法但這:
include 'class.phpmailer.php';
Warning: include(class.phpmailer.php)
[<a href='function.include'>function.include</a>]: failed to open stream: No such file or directory in /home/content/70/8352870/html/sites/mysite.com/preview/wp-content/themes/site-theme/mail/send-message.php on line 10
Obiouvsly我檢查的文件位於這裏:
mysite.com/preview/wp-content/themes/site-theme/mail/
class.phpmailer.php
class.pop3.php
class.smtp.php
send-message.php
我做錯了什麼?
'class.phpmailer.php'肯定在'/ home/content/70/8352870/html/sites/mysite.com/preview/wp-content/themes/site-theme/mail'中? – DaveRandom 2012-07-25 14:40:28
你可以顯示'print_r(glob(getcwd()。'/ *。php'));' – DaveRandom 2012-07-25 14:41:41
對,我會再次檢查,我正在使用尾波並且有時候會製造詭計 – vitto 2012-07-25 14:41:47