Include() problem again

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
ly_thai_binh
Forum Newbie
Posts: 3
Joined: Tue May 07, 2002 2:31 am
Location: Vietnam
Contact:

Include() problem again

Post by ly_thai_binh »

Hello Dear,
I could not solve my problems with your recent answer. Please provide me with other ways so that I can get over it.
The command of include ("C:PHPclass.html.mine.mail.inc") still caused me such errors as:
"
Warning: Failed opening 'C:PHPclass.html.mime.mail.inc' for inclusion (include_path='') in c:inetpubwwwrootphpNewsend.php on line 26

Fatal error: Cannot instantiate non-existent class: html_mime_mail in c:inetpubwwwrootphpNewsend.php on line 47 "

Please instruct me what i should do in the file of php.ini
Thank you in advance.
LTB
User avatar
twigletmac
Her Royal Site Adminness
Posts: 5371
Joined: Tue Apr 23, 2002 2:21 am
Location: Essex, UK

Post by twigletmac »

You are getting these errors because the file you are trying to include doesn't exist in the folder you are trying to include it from.
ly_thai_binh wrote:Warning: Failed opening 'C:PHPclass.html.mime.mail.inc' for inclusion (include_path='') in c:inetpubwwwrootphpNewsend.php on line 26
This means that PHP couldn't find the file class.html.mime.mail.inc in c:PHP.
ly_thai_binh wrote:Fatal error: Cannot instantiate non-existent class: html_mime_mail in c:inetpubwwwrootphpNewsend.php on line 47 "
This means that you are trying to use a class which doesn't exist. In your case this is because it is in the file that couldn't be included.

What you need to do is work out where you are storing the class.html.mime.mail.inc file relative to the file you are trying to include it in. You don't have to do anything to the php.ini file.

If class.html.mime.mail.inc is in the same folder as Newsend.php the include statement would be:

Code: Select all

include 'class.html.mime.mail.inc';
Mac
User avatar
sam
Forum Contributor
Posts: 217
Joined: Thu Apr 18, 2002 11:11 pm
Location: Northern California
Contact:

Post by sam »

Check to see if you have safemode on also. If you do there is a setting to allow includes from a certen directory, add your directory to the list or move your includes to the include directory specified.

Code: Select all

safe_mode_include_dir
Cheers Moe
User avatar
gotDNS
Forum Contributor
Posts: 217
Joined: Tue May 07, 2002 5:53 pm
Location: West Chester, PA

includes

Post by gotDNS »

<?php include "toppage.php"; ?>

Thats what I do to include stuff. (I didn't completely read the messages, so forgive me if my post is irrelavent)
Post Reply