php get page

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
mkyb14
Forum Newbie
Posts: 12
Joined: Sat May 28, 2005 7:46 pm

php get page

Post by mkyb14 »

is there a php get page function like they use in Wordpress?

right now i'm declaring things as variables??

Code: Select all

<?php
$header = (" blah blah");
echo $header;
and then in my index page calling the header.php

Code: Select all

<?php
		include 'winamp/header.php';
	?>
the problem is that i can't use standard html without having to erase all the quotation marks.

i noticed that wordpress has a diff funct and that it's not entirely php, just fancy html ... so is there a way in php to simply call a .php page that has no php within it?

ex:

index.php calls my winamp.php file to insert the current track playing into the index.php file. but the winamp.php is just straigh html.


HELPA
User avatar
bokehman
Forum Regular
Posts: 509
Joined: Wed May 11, 2005 2:33 am
Location: Alicante (Spain)

Post by bokehman »

If the only content in the included page is html it will be sent directly to the browser.
User avatar
s.dot
Tranquility In Moderation
Posts: 5001
Joined: Sun Feb 06, 2005 7:18 pm
Location: Indiana

Post by s.dot »

Code: Select all

include 'page.html';
I've never tried it with an html page. It may or may not work. Even if it doesn't work, just rename the page to .php and it will :)
Set Search Time - A google chrome extension. When you search only results from the past year (or set time period) are displayed. Helps tremendously when using new technologies to avoid outdated results.
User avatar
John Cartwright
Site Admin
Posts: 11470
Joined: Tue Dec 23, 2003 2:10 am
Location: Toronto
Contact:

Post by John Cartwright »

scrotaye wrote:

Code: Select all

include 'page.html';
I've never tried it with an html page. It may or may not work. Even if it doesn't work, just rename the page to .php and it will :)
.html, .js whatever all the same
Post Reply