PDA

View Full Version : A problem when viewing webpage


moe122
02-21-2008, 10:35 PM
Hey david,
How r u? gt a little problem, i've got a webpage which when i preview in explorer via dreamweaver it all fine, but when previewing another page which then links to the same page i get the error:

Warning: require_once(/Connections/Connection.php) [function.require-once (http://localhost/Test/function.require-once)]: failed to open stream: No such file or directory in C:\wamp\www\Web Root\Test\Register.php on line 2

Fatal error: require_once() [function.require (http://localhost/Test/function.require)]: Failed opening required '/Connections/Connection.php' (include_path='.;C:\php5\pear') in C:\wamp\www\Web Root\Test\Register.php on line 2

davidj
02-21-2008, 10:38 PM
in your require once call you have...


require_once(/Connections/Connection.php)

remove the first forward slash and add quotes


require_once("Connections/Connection.php");

moe122
02-21-2008, 10:46 PM
ok now i get a different error......i get that there is an error in line 15 and 35 (object expected) ??? i stil dont get when i view it straight it all fine but when viewing it via, another page it has errors?

davidj
02-21-2008, 10:48 PM
the different error is just that, A different error

dont know what you mean by...

when i view it straight it all fine but when viewing it via, another page it has errors?

davidj
02-21-2008, 10:49 PM
also i cant trouble shoot this problem without looking at the code

moe122
02-21-2008, 10:55 PM
well just noticed:
dreamweaver saves my work as TMPenrcuwm25o.php???? it suppose 2 b register.php....

so when going from Homepage to register i go to register.php which has the errrors which are standard errors on a webpage

but when opening register directly i go to TMPenrcuwm25o.php????? whats the deal with that

davidj
02-21-2008, 10:59 PM
thats the temp name dreamweaver gives to pages when you first create them

i advise that you save your pages and close dreamweaver. open dreamweaver and work as normal and see if it happens again

moe122
02-21-2008, 11:03 PM
yup still happens

okay chek this code error on line 15,29,39 and 50

<?php
require_once("Connections/Connection.php"); // Database Connection
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Homepage</title>
<script src="/Scripts/AC_RunActiveContent.js" type="text/javascript"></script>
</head>
<body>
<table width="200" border="0" align="center">
<tr>
<td colspan="2"><div align="center">
<script type="text/javascript">
AC_FL_RunContent( 'codebase','http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0','width','800','heigh t','160','hspace','0','vspace','0','align','top',' title','Logo','src','/logo3','quality','high','pluginspage','http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash','movi e','/logo3' ); //end AC code
</script>
<noscript>
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0" width="800" height="160" hspace="0" vspace="0" align="top" title="Logo">
<param name="movie" value="/logo3.swf" />
<param name="quality" value="high" />
<embed src="/logo3.swf" width="800" height="160" hspace="0" vspace="0" align="top" quality="high" pluginspage="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash"></embed>
</object>
</noscript>
</div></td>
</tr>
<tr>
<td width="210" height="37">&nbsp;</td>
<td><script type="text/javascript">
AC_FL_RunContent( 'codebase','http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0','width','195','heigh t','65','align','right','title','Register','src',' Menu3a','quality','high','pluginspage','http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash','movi e','Menu3a' ); //end AC code
</script>
<noscript>
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0" width="195" height="65" align="right" title="Register">
<param name="movie" value="Menu3a.swf" />
<param name="quality" value="high" />
<embed src="Menu3a.swf" width="195" height="65" align="right" quality="high" pluginspage="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash"></embed>
</object>
</noscript></td>
</tr>



<tr>
<td width="210" height="150"><script type="text/javascript">
AC_FL_RunContent( 'codebase','http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0','width','200','heigh t','150','hspace','0','vspace','0','align','absmid dle','title','Menu','src','Menu3','quality','high' ,'pluginspage','http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash','bgco lor','#FFFFFF','movie','Menu3' ); //end AC code
</script>
<noscript>
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0" width="200" height="150" hspace="0" vspace="0" align="absmiddle" title="Menu">
<param name="movie" value="Menu3.swf" />
<param name="quality" value="high" />
<param name="BGCOLOR" value="#FFFFFF" />
<embed src="Menu3.swf" width="200" height="150" hspace="0" vspace="0" align="absmiddle" quality="high" pluginspage="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" bgcolor="#FFFFFF"></embed>
</object>
</noscript></td>
<td height="75" rowspan="2"><script type="text/javascript">
AC_FL_RunContent( 'codebase','http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0','width','550','heigh t','400','align','top','title','Flashing Pillars','src','flashing pillars','quality','high','pluginspage','http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash','movi e','flashing pillars' ); //end AC code
</script>
<noscript>
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0" width="550" height="400" align="top" title="Flashing Pillars">
<param name="movie" value="flashing pillars.swf" />
<param name="quality" value="high" />
<embed src="flashing pillars.swf" width="550" height="400" align="top" quality="high" pluginspage="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash"></embed>
</object>
</noscript></td>
</tr>
<tr>
<td height="250">&nbsp;</td>
</tr>
</table>
<p>&nbsp; </p>
<p>&nbsp; </p>
</body>
</html>

davidj
02-21-2008, 11:09 PM
you have this

<param name="movie" value="/logo3.swf" />its incorrect

you are using a forward slash at the beginning of the logo3.swf

i told you to remove them

should be

<param name="movie" value="logo3.swf" />

moe122
02-21-2008, 11:17 PM
nope still got the errors, howcomes when viewing the temp file its ok but when viewing the saved file there are errors?

davidj
02-21-2008, 11:19 PM
post the code again

moe122
02-21-2008, 11:24 PM
ok ive made another webpage but the previous webpage had a table format within it so this time i've got no table format jus put evrything else in and got no errors..........so could i format the page layout without having a table?

davidj
02-21-2008, 11:30 PM
you can use CSS

you fixed the loose brick by knocking down the house

you need to understand why you were getting errors and then fix them by learning why it happened.

im guessing but i reckon your running before your walking

you need to understand how stuff works within a web page like HTML and paths etc