Advertisement

There's no such thing as a stupid question, but they're the easiest to answer.
Login
Search

Advertisement

Web Design & Development Web Design & Development
Search Search
Search for:
Tech Support Guy > > >

Help with Php


(!)

RichardBrown's Avatar
RichardBrown RichardBrown is offline
Computer Specs
Junior Member with 1 posts.
THREAD STARTER
 
Join Date: Jul 2011
Experience: Intermediate
27-Jul-2011, 10:34 AM #1
Help with Php
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
colinsp's Avatar
colinsp   (Colin) colinsp is offline
Computer Specs
Member with 1,663 posts.
 
Join Date: Sep 2007
Location: Spain
27-Jul-2011, 04:46 PM #2
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.
sepala's Avatar
Computer Specs
Member with 4,038 posts.
 
Join Date: May 2010
Location: Sri Lanka
Experience: Advanced
29-Jul-2011, 02:29 PM #3
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.
mnott's Avatar
mnott mnott is offline
Junior Member with 4 posts.
 
Join Date: Sep 2011
Experience: Intermediate
07-Sep-2011, 12:08 PM #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>";
ehymel's Avatar
ehymel   (Ernie) ehymel is offline
Member with 695 posts.
 
Join Date: Aug 2007
Location: Texas
08-Sep-2011, 12:11 AM #5
mnott, you need to start a new thread for a new question. Please re-post your question to a new thread.
As Seen On

BBC, Reader's Digest, PC Magazine, Today Show, Money Magazine
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.


Tags
html, index, index file, php

(clock)
THIS THREAD HAS EXPIRED.
Are you having the same problem? We have volunteers ready to answer your question, but first you'll have to join for free. Need help getting started? Check out our Welcome Guide.

Search Tech Support Guy

Find the solution to your
computer problem!




Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools


WELCOME
You Are Using: Server ID
Trusted Website Back to the Top ↑