Carrie
06-16-2006, 02:40 PM
I have tried embedding php code into my html site so CuteNews will show up, but I'm getting errors. I was wondering if maybe someone could help me figure out the problem. Here is the code that I am using. I have put the php include in bold.
<!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">
<html>
<head>
<title>Twisted RCT - The RollerCoaster Tycoon website with a twist!</title>
<style type="text/css">
a:link
{ text-decoration: none; color:#003399; }
a:visited
{ text-decoration: none; color:#003399; }
a:active
{ text-decoration: none; color:#003399; }
a:hover
{ text-decoration: underline; color:#003399; }
<!--
font { font-size: 8pt; font-family: Verdana }
-->
body,td,th {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 8pt;
color: #000000;
}
body {
background-color: #ffffff;
}
</style>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
</head>
<body>
<table width="704" border="1" align="center" cellpadding="1" cellspacing="0" bordercolor="#aad3ff" bgcolor="#dfeefd">
<tr>
<td align="center" valign="baseline"><table width="400" height="50" border="0" cellpadding="0" cellspacing="0" background="images/news.png">
<tr>
<td> </td>
</tr>
</table>
<table width="650" border="0" cellpadding="0" cellspacing="0" bgcolor="#dfeefd">
<tr>
<td align="left" valign="baseline"><?PHP
$number = "5";
include("v2/news/show_news.php");
?></td>
</tr>
</table>
<p> </p></td>
</tr>
</table>
</body>
</html>
I have tried saving the page with a .php extension, but I am still not able to get it to work. I receive the following error:
Warning: main(v2/news/show_news.php): failed to open stream: No such file or directory in /home/cehtkh86/public_html/twistedrct/v2/index.php on line 262
Warning: main(v2/news/show_news.php): failed to open stream: No such file or directory in /home/cehtkh86/public_html/twistedrct/v2/index.php on line 262
Warning: main(): Failed opening 'v2/news/show_news.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/cehtkh86/public_html/twistedrct/v2/index.php on line 262
Previously, I was using the following iframe code so the news would show up on my index.html page. But, I only wanted 5 news items to show up on the index page, so I need to use php instead.
<iframe id="news" src="http://www.twistedrct.com/news/show_news.php" scrolling="no" marginwidth="0" marginheight="0" frameborder="0" vspace="0" hspace="0" style="overflow:visible; width:100%; display:none"></iframe>
Does anyone have ideas about what I'm doing wrong with the php includes?
Thanks for your help!
<!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">
<html>
<head>
<title>Twisted RCT - The RollerCoaster Tycoon website with a twist!</title>
<style type="text/css">
a:link
{ text-decoration: none; color:#003399; }
a:visited
{ text-decoration: none; color:#003399; }
a:active
{ text-decoration: none; color:#003399; }
a:hover
{ text-decoration: underline; color:#003399; }
<!--
font { font-size: 8pt; font-family: Verdana }
-->
body,td,th {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 8pt;
color: #000000;
}
body {
background-color: #ffffff;
}
</style>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
</head>
<body>
<table width="704" border="1" align="center" cellpadding="1" cellspacing="0" bordercolor="#aad3ff" bgcolor="#dfeefd">
<tr>
<td align="center" valign="baseline"><table width="400" height="50" border="0" cellpadding="0" cellspacing="0" background="images/news.png">
<tr>
<td> </td>
</tr>
</table>
<table width="650" border="0" cellpadding="0" cellspacing="0" bgcolor="#dfeefd">
<tr>
<td align="left" valign="baseline"><?PHP
$number = "5";
include("v2/news/show_news.php");
?></td>
</tr>
</table>
<p> </p></td>
</tr>
</table>
</body>
</html>
I have tried saving the page with a .php extension, but I am still not able to get it to work. I receive the following error:
Warning: main(v2/news/show_news.php): failed to open stream: No such file or directory in /home/cehtkh86/public_html/twistedrct/v2/index.php on line 262
Warning: main(v2/news/show_news.php): failed to open stream: No such file or directory in /home/cehtkh86/public_html/twistedrct/v2/index.php on line 262
Warning: main(): Failed opening 'v2/news/show_news.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/cehtkh86/public_html/twistedrct/v2/index.php on line 262
Previously, I was using the following iframe code so the news would show up on my index.html page. But, I only wanted 5 news items to show up on the index page, so I need to use php instead.
<iframe id="news" src="http://www.twistedrct.com/news/show_news.php" scrolling="no" marginwidth="0" marginheight="0" frameborder="0" vspace="0" hspace="0" style="overflow:visible; width:100%; display:none"></iframe>
Does anyone have ideas about what I'm doing wrong with the php includes?
Thanks for your help!