How to use PHP includes in HTML files?

Originally, I built my web sites with just plain HTML.  To make it easier and not have to duplicate HTML I used include files to include common HTML that I had on my web sites, e.g. Google Analytics code, Copyright, internal and external links, contact information.  For example, the html include syntax I used to include the common Google Analytics code was:

<!–#include virtual=”includeanalytics.html” –>

However, I wanted more functionality on my web sites, so I started using PHP 5.3 on my host (GoDaddy).  When I set up PHP to run for my websites, all my includes stopped working.  This is because the .html files were being interpreted by the PHP engine.  To fix this, I had to use PHP include syntax, e.g.

<?php include(‘includeanalytics.html’); ?>

After using this syntax, my includes worked correctly.  So, this is how to use PHP includes in HTML files.


What to have prior to signing up for Twitter?

I recently joined Twitter because I knew a number of people that were already on it .  So, I signed up for Twitter and sent out some Tweets to the people that I knew.  And you know what I got…everyone got back to me and said ‘Get rid of that egg!’.  The ‘egg’ they were referring to is the default Twitter profile picture that shows if you haven’t uploaded your own photo.  So, to avoid grief, I would recommend that you have a photo ready and to upload this photo as your profile before you send out any tweets.  Just so you know, the Twitter profile picture specifications are that the photo must be a jpeg, gif or png file and the file size must be less than 700k .

How to change GoDaddy session timeout limit?

I use GoDaddy for my hosting.  Quite frequently, I will sign in to GoDaddy, uploaded some changed files, then test the changes, make updates, then re-upload the files.  I found that if I keep the FTP File Manager open, then I can continue to upload files without my session timing out.  However, if I go to do anything else in my account, I usually get a timeout message.  I don’t know for sure, but the timeout limit for GoDaddy seems to be around 15 minutes.  If you are on some GoDaddy screens it will pop-up a message saying that it is timing out and give you the option to extend your session.  Frequently though, I don’t see this pop-up and have to logon again.  The last time I called GoDaddy support, I asked if they could the timeout limit for me.  I was told that it was a global setting and that they could not raise the limit for me.  So, the answer is No, you cannot change the GoDaddy session timeout limit.

Can people see the source code of my PHP files on my web site?

On one of my web sites, I am using PHP as the server-side language to connect to a MySql database.  In order to connect to the database, you need to build a connection string that has a user id and password.  At first, I was really concerned that somebody would be able to just view the source of my PHP files and get my database user id and password.  I did some research and everybody says that it is impossible for somebody to see the PHP source code on a website.  Just to be safe, I used the FTP File Manager on my GoDaddy hosting to change the permissions of my PHP files to be execute only.   So, the answer to the question is ‘NO’, the source code of PHP files on a web site cannot be seen by web site users.