pouncer Posted November 13, 2006 Share Posted November 13, 2006 i have a folder called php_classes with a class_db.php in it.i created a folder called forum.Inside forum i put addtopic.phpinside addtopic.php i put[code=php:0]require_once("php_classes/class_db.php");[/code]which is throwing me an errorWarning: main(php_classes/class_login.php) [function.main]: failed to open stream: No such file or directory in c:\domains\bn.nl\wwwroot\myftp\forum\addtopic.php on line 4line4 is the require line, whats the problemit works when i put the addtopic.php outside of the forum folder, but not when it is inside the folder. Quote Link to comment Share on other sites More sharing options...
trq Posted November 13, 2006 Share Posted November 13, 2006 Hard to tell from your description but its a simple path problem. Try...[code=php:0]require_once("../php_classes/class_db.php");[/code] Quote Link to comment Share on other sites More sharing options...
pouncer Posted November 13, 2006 Author Share Posted November 13, 2006 nope, still the same error :sThis is the exact code ive got at the top of addtopic.php[code=php:0]<?php session_start(); require_once("../php_classes/class_login.php"); $log = new Login();?>[/code] Quote Link to comment Share on other sites More sharing options...
trq Posted November 13, 2006 Share Posted November 13, 2006 Your much better off using the full filepath anyway. Something like...[code=php:0]requeire_once '/myftp/php_classes/class_db.php');[/code] Quote Link to comment Share on other sites More sharing options...
pouncer Posted November 13, 2006 Author Share Posted November 13, 2006 damn. nothing seems to work.i tried all your sugestions :s Quote Link to comment Share on other sites More sharing options...
trq Posted November 13, 2006 Share Posted November 13, 2006 Well you need to tell us what your folder structure looks like. Is it?[code]/myftp /php_classes class_db.php /forum addtopic.php[/code]or...[code]/myftp /php_classes /forum addtopic.php class_db.php[/code]hope you can see it. Quote Link to comment Share on other sites More sharing options...
pouncer Posted November 13, 2006 Author Share Posted November 13, 2006 yep its your first one Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.