Results 1 to 14 of 14

Thread: Program like web language

  1. #1
    Guest

    Post

    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!!!!

  2. #2
    Guest
    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

    Code:
    //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

  3. #3
    Guest
    Id like to learn PHP, but im doing it on my home computer.

  4. #4
    Monday Morning Lunatic parksie's Avatar
    Join Date
    Mar 2000
    Location
    Mashin' on the motorway
    Posts
    8,169

    Talking Freebies all round

    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?
    I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
    -- Linus Torvalds

  5. #5
    Guest
    Where do i get PWS, i dont have the windows disk, and MS doesnt let you download it from their site.

  6. #6
    Monday Morning Lunatic parksie's Avatar
    Join Date
    Mar 2000
    Location
    Mashin' on the motorway
    Posts
    8,169
    No idea. In that case use Apache.
    I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
    -- Linus Torvalds

  7. #7
    Guest
    Ok, im downloading apache. When its done, do i just install it into the folder containing my php files?

  8. #8
    Monday Morning Lunatic parksie's Avatar
    Join Date
    Mar 2000
    Location
    Mashin' on the motorway
    Posts
    8,169
    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
    I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
    -- Linus Torvalds

  9. #9
    Guest
    Ok, it was a setup program, and it installed itself into program files, and now i have no idea what to do now.

  10. #10
    Monday Morning Lunatic parksie's Avatar
    Join Date
    Mar 2000
    Location
    Mashin' on the motorway
    Posts
    8,169
    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.
    I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
    -- Linus Torvalds

  11. #11
    Guest
    Well, the setup file did everything already, i think, i just dont know how to use it.

  12. #12
    Monday Morning Lunatic parksie's Avatar
    Join Date
    Mar 2000
    Location
    Mashin' on the motorway
    Posts
    8,169
    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.
    I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
    -- Linus Torvalds

  13. #13
    Guest
    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

  14. #14
    Monday Morning Lunatic parksie's Avatar
    Join Date
    Mar 2000
    Location
    Mashin' on the motorway
    Posts
    8,169
    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.
    I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
    -- Linus Torvalds

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width