Jump to content

include_once error message?


Masterman535

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.