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


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.
Join Date: Jul 2011
Experience: Intermediate
27-Jul-2011, 09: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,828 posts.
Join Date: Sep 2007
Location: Spain
27-Jul-2011, 03: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, 01: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, 11:08 AM #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>";
$file = "files/$i-$year.jpg";
while ($total!=0){
if (!file_exists("$file") && $i!=1){
else if (!file_exists("$file") && $i=1){
else if (file_exists("$file") && $i!=1 && $total!=6){
echo "<li><img src='$file' alt='' width='65' height='84' />$total - $file - 1</li>";

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


echo "</ul>";
ehymel's Avatar
ehymel   (Ernie) ehymel is offline
Member with 695 posts.
Join Date: Aug 2007
Location: Texas
07-Sep-2011, 11:11 PM #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

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.

html, index, index file, php

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

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