View Full Version : Making it a PHP site


outlawspirit
03-10-2005, 01:16 PM
ok... i have now done all my coding for my site and have the HTML but i want it to be a PHP site so therefor it will be much easier to update etc...

so i would like -

MAIN IMAGE (BANNER)

MENU

SIDE CONTENT

FOOTER


all of them split into different parts so i can update each part individually and it will update it throughout the whole site...


now... im kinda experience with HTML but im not really experienced with PHP and was wondering if someone could re-code my HTML code to make it PHP compatible and then tell me how i put it together... i have a small idea so i wont be completly idiotic to this...

any help is appreciated

my html file is here - http://flyservers.registerfly.com/members5/outlawspirit.com/template/indexx.html

(right click --> view source)

thanks alot, its greatly appreciated

Sheila
03-10-2005, 01:19 PM
First off, does your host support PHP?

EDIT: I went to the place where your site is hosted. If you are using the Free Account, it doesn't support PHP.

outlawspirit
03-10-2005, 01:26 PM
First off, does your host support PHP?

EDIT: I went to the place where your site is hosted. If you are using the Free Account, it doesn't support PHP.


the one i got does support PHP :)

outlawspirit
03-10-2005, 02:07 PM
the one i got does support PHP :)

i also have another host... with php also

pb&j
03-10-2005, 03:21 PM
sounds like all you need to do is use some php "includes". at least that is one way to go into.

take your full webpage coding. figure out what parts will be the same and what parts are going to be changing.

for the parts that stay the same, cut and paste those parts into their own seperate pages. in the space you just created, put in the "include" command.

example...

<?php
include ("footer.php");
?>

now when the main page is loaded and comes to that php command, it will look at the contents of "footer.php" and insert them back into place at that spot.

if you ever have to adjust the footer in all of your pages, just edit that one footer.php page and since it is "included" on all your other pages, it will appear like done.

outlawspirit
03-11-2005, 01:28 PM
thats exactly what i would like to happen... im jus tryin to put it together now :rolleyes:

outlawspirit
03-11-2005, 01:37 PM
OK... so i have test2.php

included in it is -

if php works this message should show


so i made a new page called test.php

included in it is -

<html>
<head>
<title>Your Page Title</title>
<style type="text/css">
<?php include"http://free.hostultra.com/~outlawspirit/test2.php" ?>
</style>
</head>
<body>


however... when i look at test.php it does not show on that page test2.php's information

what have i done wrong??

starlet
03-11-2005, 05:40 PM
<html>
<head>
<title>Your Page Title</title>
<style type="text/css">
</style>
</head>
<body>
<?php include
("http://free.hostultra.com/~outlawspirit/test2.php");
?>

outlawspirit
03-12-2005, 10:11 AM
when i put that code in starlet... i looked at the page and it now came up with this

(http://free.hostultra.com/~outlawspirit/testing.php)

Warning: main(): URL file-access is disabled in the server configuration in /data/hosted/outlawspirit/testing.php on line 9

Warning: main(http://free.hostultra.com/~outlawspirit/test2.php): failed to open stream: no suitable wrapper could be found in /data/hosted/outlawspirit/testing.php on line 9

Warning: main(): URL file-access is disabled in the server configuration in /data/hosted/outlawspirit/testing.php on line 9

Warning: main(http://free.hostultra.com/~outlawspirit/test2.php): failed to open stream: no suitable wrapper could be found in /data/hosted/outlawspirit/testing.php on line 9

Warning: main(): Failed opening 'http://free.hostultra.com/~outlawspirit/test2.php' for inclusion (include_path='./') in /data/hosted/outlawspirit/testing.php on line 9

darklitch
03-12-2005, 11:45 AM
try something plain:
<?php
include("http://free.hostultra.com/~outlawspirit/test2.php");
?>

does your host support the includes?