Jump to content

Recommended Posts

Hey all,

I have some php code that is supposed to spit out family trees for a few different families.  However, i keep getting an error:

 

Warning: include_once(includes/class/main.class.php) [function.include-once]: failed to open stream: No such file or directory in /home/aepiucf/public_html/famtree.php on line 15

 

Warning: include_once() [function.include]: Failed opening 'includes/class/main.class.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/aepiucf/public_html/famtree.php on line 15

 

Line 15 is:

 

include_once "includes/class/main.class.php";

 

I've also tried:

 

include_once('includes/class/main.class.php'); but no difference

 

Any help?

 

Thanks a bunch!

Josh

Link to comment
https://forums.phpfreaks.com/topic/130447-include_once-error-message/
Share on other sites

You need to point to where the file is located. Your current file appears to be famtree.php located in /home/aepiucf/public_html/. Using include with "includes/class/" will look in /home/aepiucf/public_html/includes/class/ and it will look in /usr/lib/php/includes/class/ and /usr/local/lib/php/includes/class/ for main.class.php.

 

PHP will look for the requested file in any of the includes directories and in the current directory.

Hmmm,

I cannot seem to find main.class.php anywhere on the server.  Is there a way to simply upload it?  I have filezilla installed to upload anything i need

**EDIT** I'm looking in the cPanel right now, and it says php 5.2.6 is installed on the server.  Any ideas?

Thanks,

Josh

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.