Jump to content

Recommended Posts

I know the extension has to be php unless you change web server settings

 

What im trying to do is put this gallery script i got from Stadaus.Com Into my current web layout I even trying putting the code from the gallery.php into the spot where i can it to display which is Div- Content and the script dose not show. But gallery.php show fine. Thanks

 

Here is my code

<?php
mb_http_input("utf-8");
mb_http_output("utf-8");
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>My WebSite</title>
<meta name="keywords" content="" />
<meta name="description" content="" />
<link href="default.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="header">
<div id="logo">
	<h1> </h1>
	<h2> </h2>
</div>
<div id="menu">
	<ul>
		<li class="active"><a href="#" title="">Home</a></li>
		<li><a href="#" title="">Photos</a></li>
		<li><a href="#" title="">Battle Boards</a></li>
		<li><a href="#" title="">Forums</a></li>
		<li><a href="#" title="">Contacts</a></li>
            </ul>
</div>
</div>
<div id="wrapper">
<div id="content"><?php include("gallery.php") ?></div>
  <div style="clear: both;"> </div>
</div>
<div id="footer">
<p id="legal">Copyright © 2007 GraffInTheNo. All Rights Reserved. </p>
<p><a href="#">Privacy Policy</a> | <a href="#">Terms of Use</a></p>
</div>
</body>
</html>

Link to comment
https://forums.phpfreaks.com/topic/56171-put-php-script-into-current-html-page/
Share on other sites

I think your problem is with html not php.

You seem to be trying to insert a page made up of frames into a div, which I'm quite sure wouldn't work. Try putting it in an iframe, if you must use frames at all.

<?php
mb_http_input("utf-8");
mb_http_output("utf-8");
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>My WebSite</title>
<meta name="keywords" content="" />
<meta name="description" content="" />
<link href="default.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="header">
<div id="logo">
	<h1> </h1>
	<h2> </h2>
</div>
<div id="menu">
	<ul>
		<li class="active"><a href="#" title="">Home</a></li>
		<li><a href="#" title="">Photos</a></li>
		<li><a href="#" title="">Battle Boards</a></li>
		<li><a href="#" title="">Forums</a></li>
		<li><a href="#" title="">Contacts</a></li>
            </ul>
</div>
</div>
<div id="wrapper">
<iframe id="content"><?php include("gallery.php") ?></iframe>
  <div style="clear: both;"> </div>
</div>
<div id="footer">
<p id="legal">Copyright © 2007 GraffInTheNo. All Rights Reserved. </p>
<p><a href="#">Privacy Policy</a> | <a href="#">Terms of Use</a></p>
</div>
</body>
</html>

 

That could work ;)

Oh yeah if you look at the source youll notice this section

<div id="wrapper">
<iframe id="content">

<html>
  <head>
    <title>Gallery Script</title>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
  </head>

  <frameset cols="*,200" frameborder="NO" border="0" framespacing="0">
    <frame name="mainframe" src="./gallery/y_frame_main.php?">
    <frame name="naviframe" noresize src="./gallery/y_frame_navi.php">
  </frameset>

</html>
  </iframe>

 

I put like you had it and it displays that code. and nothing appears.

oops.. I think that was my mistake. i haven't used frames for a couple of years. I think it should be this:

<?php
mb_http_input("utf-8");
mb_http_output("utf-8");
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>My WebSite</title>
<meta name="keywords" content="" />
<meta name="description" content="" />
<link href="default.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="header">
<div id="logo">
	<h1> </h1>
	<h2> </h2>
</div>
<div id="menu">
	<ul>
		<li class="active"><a href="#" title="">Home</a></li>
		<li><a href="#" title="">Photos</a></li>
		<li><a href="#" title="">Battle Boards</a></li>
		<li><a href="#" title="">Forums</a></li>
		<li><a href="#" title="">Contacts</a></li>
            </ul>
</div>
</div>
<div id="wrapper">
<iframe id="content" src="gallery.php"></iframe>
  <div style="clear: both;"> </div>
</div>
<div id="footer">
<p id="legal">Copyright © 2007 GraffInTheNo. All Rights Reserved. </p>
<p><a href="#">Privacy Policy</a> | <a href="#">Terms of Use</a></p>
</div>
</body>
</html>

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

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