2DWorlds Forums
Starting Your Website - Printable Version

+- 2DWorlds Forums (http://2dworlds.buildism.net/forum)
+-- Forum: Off Topic (http://2dworlds.buildism.net/forum/forumdisplay.php?fid=5)
+--- Forum: Programming (http://2dworlds.buildism.net/forum/forumdisplay.php?fid=30)
+--- Thread: Starting Your Website (/showthread.php?tid=6587)



Starting Your Website - Chaos - 07-06-2011

First off: use 000webhost.com. They have all you need to start off.

Now, I'm not going to truly show you how to code it, but this is what you will need to actually start the website.

First go open up your notepad (or any other like ConText) and start a file called index.php.

It has to be index.php because when you go to the website you just made, it says Index of /. That pretty much means you need an index.php file.

Now, This is how your index.php file should say:

[lua]
<?php
include("header.php");
//content here
include("footer.php");
?>
[/lua]

Now, As you can see if you can read, I used header.php and footer.php. We will make those in a minute, but let me explain:

Header.php is well, the head of your site and the thing you will need to use to link your css to EVERY page of your website.

Footer.php is just the bottom of your website and is needed, but not as important.

Header.php:

[lua]
<html>
<head>
</head>
<body>
[/lua]

Footer.php:

[lua]
</body>
</html>
[/lua]

Do you understand why footer.php has closed tags? Because in index.php they will eventually be merged.

Once you have that, upload them to you site in the public_html folder (if you are using 000webhost), and you will have the start of your website.

Next learn CSS and add that to index.php in the '//content here' line.

Enjoy,
Chaos


RE: Starting Your Website - Chaos - 07-09-2011

Bump for website starters.


RE: Starting Your Website - sergentkyle - 07-09-2011

Ummm...


._.


RE: Starting Your Website - Blandflakes - 07-09-2011

Actually it's easier just to use a style sheet and than put it in the header file.

Code:
<html>
<head>
<link rel="stylesheet" href="linktocssstylesheet" type="text/css">
</head>
<body>


Big Grin


RE: Starting Your Website - Chaos - 07-11-2011

I think Kyle needs some help...


RE: Starting Your Website - Spongebob1212 - 07-11-2011

(07-11-2011, 02:58 AM)Chaos Wrote: I think Kyle needs some help...

True.


RE: Starting Your Website - sergentkyle - 07-11-2011

I dun understand that scripting stuff. D:


RE: Starting Your Website - Chaos - 07-11-2011

Well, I'm scripting in PHP not Lua...

But otherwise that's as simple as is gets besides:

[lua]
<?php
echo "Hi Kyle";
?>[/lua]