1. Computer problem? Tech Support Guy is completely free -- paid for by advertisers and donations. Click here to join today! If you're new to Tech Support Guy, we highly recommend that you visit our Guide for New Members.

Help with Php

Discussion in 'Web Design & Development' started by RichardBrown, Jul 27, 2011.

Thread Status:
Not open for further replies.
Advertisement
  1. RichardBrown

    RichardBrown Thread Starter

    Joined:
    Jul 27, 2011
    Messages:
    1
    I was working on a website doing SEO for a client and I wanted to change the title in the homepage. I noticed there was no index.html file in the public_html folder. so my friend suggested just adding one, and I used the html code found in the source code of the page and the homepage appeared the same. However on closer inspection none of the other page links no longer lead to their files.
    There was a index.php file in public_html folder and its still there..what have I done wrong for the links to no longer lead anywhere?

    Please help
     
  2. colinsp

    colinsp

    Joined:
    Sep 5, 2007
    Messages:
    1,834
    You don't need an index.html file. By having that in the folder it takes precedence over the index.php file which is what you want visitors to see when the visit the site. Delete the index.html file and all will be back to normal.
     
  3. sepala

    sepala

    Joined:
    May 20, 2010
    Messages:
    4,038
    Yes. index, home, main, etc, are some default names taken by the server for the home page. It doesn't matter whether it is PHP or HTML.
     
  4. mnott

    mnott

    Joined:
    Sep 7, 2011
    Messages:
    4
    I'm running into a problem. I've tried re-writing this code over and over and I run into little problems every time. currently the value for $i doesn't lower. here's my code.

    echo "<ul>";
    $year=date("Y");
    $total=12;
    $i=6;
    $file = "files/$i-$year.jpg";
    while ($total!=0){
    if (!file_exists("$file") && $i!=1){
    $i--;
    }
    else if (!file_exists("$file") && $i=1){
    $year--;
    $i=6;
    }
    else if (file_exists("$file") && $i!=1 && $total!=6){
    echo "<li><img src='$file' alt='' width='65' height='84' />$total - $file - 1</li>";
    $i--;
    $total--;

    }
    else if (file_exists("$file") && $i=1 && $total!=6){
    echo "<li><img src='$file' alt='' width='65' height='84' />$file - 2</li>";
    $total--;
    $i=6;
    $year--;
    }
    else if (file_exists("$file") && $i=1 && $total=6){
    echo "</ul><ul><li><img src='$file' alt='' width='65' height='84' />$file - 3</li>";
    $total--;
    $i=6;
    $year--;
    }
    else if (file_exists("$file") && $i!=1 && $total=6){
    echo "</ul><ul><li><img src='$file' alt='' width='65' height='84' />$file - 4</li>";
    $total--;
    $i--;

    }


    }
    echo "</ul>";
     
  5. ehymel

    ehymel

    Joined:
    Aug 12, 2007
    Messages:
    695
    mnott, you need to start a new thread for a new question. Please re-post your question to a new thread.
     
  6. Sponsor

As Seen On
As Seen On...

Welcome to Tech Support Guy!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.

Join over 733,556 other people just like you!

Loading...
Thread Status:
Not open for further replies.

Short URL to this thread: https://techguy.org/1009396