0

Sorry if this is a simple question, but I have been having some problems with my website. I have used both HostGator and Godaddy to host my site. But on both site I have been getting a consistent problem, image: http://postimg.org/image/optvm8qy7/ (sorry for links i did not want to clog up the page).

My problem, or what I think that my problem, is that my default file that we website reads is index.php. I know that that is usable and it dose work on my localhost server. But the index.php file contains both php and html code inside it: http://postimg.org/image/79eyw0fvt/ (once again sorry for the link and not an image on the page).

So what I am Thinking is that for some reason the Web host cant read the php code or is reading it as regular text. Because as you can see the title of the webpage is meant to say "Jackpot Battles", but it says <?php echo $tital; ?>. The thing is that it will read the rest of the files and the website correctly just not any php.

If anyone has any ideas on what could be causing this, or would like any extra information please leave a comment.

Thank you for your time.

3
  • 2
    try calling <?php phpinfo(); ?> in an empty file. You will know if PHP is at all enabled. Commented Dec 30, 2015 at 21:53
  • Do you have an .htaccess file on your site that might be causing issues? Commented Dec 30, 2015 at 21:55
  • Ok I have done that and it seemed to work fine, link: postimg.org/image/f26ke6dx7 Commented Dec 30, 2015 at 21:56

1 Answer 1

3

It looks like the default page for your host is index.html. While index.php might be on the list, because you have an index.html file it is pointing to that. If you delete or rename index.html it will likely work. I can view what looks to be the correct data by going to http://jackpotbattles.pw/index.php

Sign up to request clarification or add additional context in comments.

2 Comments

lol. I was just typing this. This can be fixed in the apache config file by adding "DirectoryIndex index.php"
Thank you Ckimbrell for the answer. That seemed to do the trick.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.