logo-dw

Go Back   Dreamweaver Club Forums > Dreamweaver forums > Video Tutorials
Register FAQ Members List Search Today's Posts Mark Forums Read

Reply
 
Thread Tools Display Modes
Old 02-08-2007, 03:31 PM   #1
MintDanny
 
Join Date: Feb 2007
Posts: 14
Default yea another problem

Hey,

i am currently up to the stage of getting a result from the database i have created,

here is the error i get

Warning: require_once(Connections/connection.php) [function.require-once]: failed to open stream: No such file or directory in C:\Documents and Settings\Owner\My Documents\Local Root\Test\Image\dwc.php on line 2

Fatal error: require_once() [function.require]: Failed opening required 'Connections/connection.php' (include_path='.;C:\php5\pear') in C:\Documents and Settings\Owner\My Documents\Local Root\Test\Image\dwc.php on line 2

Here is the code i am using;

PHP Code:
<?php
require_once("Connections/connection.php"); //database connection

///////////////////////////////////////////////
$query    sprintf("SELECT * FROM table1");
$result   = @mysql_query($query);
$row      mysql_fetch_array($result);
//////////////////////////////////////////////// 

echo $row['field2'];


?>
Thanks in advance

Danny
MintDanny is offline   Reply With Quote
Old 02-08-2007, 03:37 PM   #2
domedia
Administrator
domedia's Avatar
 
Join Date: Dec 2003
Posts: 9,730
Default

uhm.. did you read the error message?

Connections/connection.php...

No such file or directory in C:\Documents and Settings\Owner\My Documents\Local Root\Test\Image\dwc.php
domedia is offline   Reply With Quote
Old 02-08-2007, 03:40 PM   #3
MintDanny
 
Join Date: Feb 2007
Posts: 14
Default

Hey,

i thought the connection.php was supose to be located here;

C:\Documents and Settings\Owner\My Documents\Local Root\Test\Connections\connection.php

not

C:\Documents and Settings\Owner\My Documents\Local Root\Test\Image\dwc.php

Danny
MintDanny is offline   Reply With Quote
Old 02-08-2007, 03:49 PM   #4
domedia
Administrator
domedia's Avatar
 
Join Date: Dec 2003
Posts: 9,730
Default

You just referred to 2 different files, so I'm not sure what to make out of it.

More importantly, if you read the error messages you are getting; are you able to understand what they mean?
domedia is offline   Reply With Quote
Old 02-08-2007, 03:50 PM   #5
domedia
Administrator
domedia's Avatar
 
Join Date: Dec 2003
Posts: 9,730
Default

hint.. look at the path for connection.php
domedia is offline   Reply With Quote
Old 02-08-2007, 03:54 PM   #6
MintDanny
 
Join Date: Feb 2007
Posts: 14
Default

thats why i am posting here, i do not understand what the error message is telling me to do, i have saved all the files where the tutorials told me so i do not see what is going wrong

Danny
MintDanny is offline   Reply With Quote
Old 02-08-2007, 06:21 PM   #7
davidj
davidj's Avatar
 
Join Date: Sep 2005
Location: The Toon (newcastle upon Tyne)
Posts: 8,256
Default

the first error message indicates that it cant pull in the connections script...

C:\Documents and Settings\Owner\My Documents\Local Root\Test\Image\dwc.php

this is because the dwc.php is in your image dir which means the the path to your connection script is incorrect

the next error is just a symptom of the first error.

your dwc.php file should be located in the root of the dir not in root/image as you have it and the connection script should be in root/Connections/
__________________
Would you like to learn PHP from me? Check out -> www.codezenith.co.uk
davidj is offline   Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 11:34 AM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2017, vBulletin Solutions, Inc.
Copyright 2006 DreamweaverClub.com