PDA

Click to See Complete Forum and Search --> : Program like web language


Nov 6th, 2000, 01:19 PM
In a C++ program, if you define a string to be "arial", it can be used through out the whole app. You change "arial" to "hello", and it changes through out the whole app. Is there any way to do that with web pages? I to be able to change the font for the entier site, but i dont want to go through every page and change it, HELP!!!!

Nov 6th, 2000, 01:36 PM
You can use CSS(cascading style sheets)
see http://www.htmlgoodies.com for more information...

if you can use a server side scripting language, such as PHP, or ASP,
you can do it like this


//index.php
<?php
require("variable.php"); //this has the variable defined in it. plus the function mentioned below.

showheader("index");

?>
Mytext here
</BODY>
</HTML>


//variable.php
<?php
$bgcolor = "yellow";
function showheader($title)
{
echo "<HTML>\n<HEAD>\n<TITLE>$title</TITLE>\n</HEAD>\n";
echo "<BODY BGCOLOR=$bgcolor>";
}
?>


It can be done in ASP too, but I won't bother with that now, as I am sure you can figure it out :D

Nov 6th, 2000, 02:35 PM
Id like to learn PHP, but im doing it on my home computer.

parksie
Nov 6th, 2000, 02:59 PM
PHP is free from http://www.php.net

You need a web server to go with it, and I suggest Apache from http://www.apache.org. However, you may want to try getting it to work with PWS?

Nov 6th, 2000, 03:25 PM
Where do i get PWS, i dont have the windows disk, and MS doesnt let you download it from their site.

parksie
Nov 6th, 2000, 03:37 PM
No idea. In that case use Apache.

Nov 6th, 2000, 03:47 PM
Ok, im downloading apache. When its done, do i just install it into the folder containing my php files?

parksie
Nov 6th, 2000, 03:52 PM
No. Apache is installed into a different folder. I would suggest getting Apache properly set up first, then follow the PHP instructions to set that up.

BTW - Apache can be a little tricky to configure for someone used to wizards and dialogues...slight warning ;)

Nov 6th, 2000, 04:02 PM
Ok, it was a setup program, and it installed itself into program files, and now i have no idea what to do now.

parksie
Nov 6th, 2000, 04:04 PM
Check the manual, and take a look at the contents of httpd.conf. This is where it gets a bit painful :(. However, the bright side is that once it's set up, you don't need to do much else to it.

Nov 6th, 2000, 04:13 PM
Well, the setup file did everything already, i think, i just dont know how to use it.

parksie
Nov 6th, 2000, 04:17 PM
Unfortunately, the setup program merely installs the files. You now have to configure the server so that it works. It's been a while since I set mine up, so I can't remember. It's definitely not a run-from-the-box server.

Nov 6th, 2000, 04:35 PM
Chimp:
try checking

C:\WINDOWS\OPTIONS\CABS\PWS


and I downloaded apache, and got it working... it's awesome...

BUT I can't get PHP to work with it :(

so for now i have to use PWS

parksie
Nov 7th, 2000, 05:50 AM
You probably had a properly-installed version then. The options folder only appears in some.

When I get home I'll send you some stuff.