Google Answers Logo
View Question
 
Q: Updating a website by uploading files ( No Answer,   3 Comments )
Question  
Subject: Updating a website by uploading files
Category: Computers
Asked by: fieldlily-ga
List Price: $10.00
Posted: 10 Jun 2005 22:25 PDT
Expires: 10 Jul 2005 22:25 PDT
Question ID: 532108
I'm trying to update a website someone else wrote. I know just enough
html to be dangerous--I wrote my own simple site, but that's it. The
person who wrote the previous site was more sophisticated than I
am, so I'm trying to sort my way through all the files. Why do some of
the files have the suffix ".php" or ".log"? They open in Firefox when
I download them to my desktop and change the suffix to ".htm," so I am
pretty sure they're the ones I need, but I want to know why the
designer didn't just use .htm or .html. Also, when I log on to my own
host server to upload my own page, I just use the URL, with www. But
to manage this site, the address I use to log in starts with ftp.
Why?
Answer  
There is no answer at this time.

Comments  
Subject: Re: Updating a website by uploading files
From: danielvijge-ga on 11 Jun 2005 04:11 PDT
 
There are several question, and I'll try to explain them.
First, the files with the extension .php. PHP is a server-side
scripting language. This means you can write little programs, or
scripts, that run on the server. Such a script produces HTML and sends
this to your browser. This makes it possible to make dynamic pages,
such as forums.
A quick example to clarify this. Say you have a .php file on the
server with this text in it:

if (1 == 1)
{
  echo 'The statement is true';
}
else
{
  echo 'The statement is false';
}

The use of { and } is just how PHP works, don't worry about that. Now,
when a browser requests this page from the server (the users types the
URL), the server is going to evaluate it. It first will test if 1 is
equal to 1. If, and only if, this is true it will send 'This statement
is true' to the user's browsers. Else it will send 'This statement is
false'. A user viewing this page will only see one line, in this case
'This statement is true', since 1 equals 1. The code remains invisible
to the user that is viewing the page.
This is a very simple script, but scripts can be very difficult. For
more information about PHP: http://www.php.net

Now, as for .log files. Apparently the script also logs what is going
on. For example, a script can be written in such a way that all who
visits the page are logged. This is a way to keep track of the number
of users that visit the page, or to identify how users come to a page
(from with other page). To view the content of a log file, simply open
in in your browser, and it will shown you what's in the log files.

Last, FTP. FTP stands for File Transfer Protocol. It's an internet
protocol, such as HTTP - Hyper Text Transfer Protocol. There are
different protocols on the internet. This are rules programs, such as
your internet browser, uses to communicate to servers on the internet.
A protocol makes sure your browser and the server can understand each
other. For internet pages a browser uses HTTP. FTP is a special
protocol to send files between two computers. When sending files from
your computer to a server this special protocol is used.
Subject: Re: Updating a website by uploading files
From: phossil-ga on 16 Jun 2005 10:43 PDT
 
What is PHP?
PHP is a widely-used general-purpose scripting language that is
especially suited for Web development and can be embedded into HTML.
If you are new to PHP and want to get some idea of how it works, try
the Official PHP site at:
http://www.php.net/

Also you could check How ASP works in:
http://computer.howstuffworks.com/asp.htm and get the basic idea of
how dinamic Pages work (ASP, PHP, etc)

I hope it helps.
Phossil.
Subject: Re: Updating a website by uploading files
From: kennethcircle-ga on 19 Jun 2005 21:10 PDT
 
Simply speaking, file extensions (or "suffix" in your words) is one of
the ways to distinguish different types of file. In most cases, .htm
or .html files are HTML documents, and .php files are PHP script, .log
files are log file. A HTML document contain HTML text, which is
basically used to describe the appearence of a webpage, the browsers
(eg. IE, Firefox) parse the HTML text and display the webpage
accordingly. You can simply put a HTML file on a webserver, when the
browser get it, it can display the webpage you describe. However, the
content is static (i.e. the HTML text the browser recieve never
changes unless you upload/edit a new HTML file to the web server).
There is a way to make dynamic content for a HTML file in respond to
different conditions - using server side scripts, and PHP is one of
them. Indeed when you browse web page, it is not an one-way
communication. While you are getting information from the web server,
you are sending information to it. Ones can write server side scripts
(like PHP) to handle such information to generate the HTML text in
real time and send to the browser, and the browser just display what
it describe as if it is a static HTML file. That's why you can see
some webpage having greeting message like: "Good morning, Mr. XXXXX!".
When you view the source code of the page, you may find it do not
involve any client-side script like Javascript, and the sentence is
apparently hardcoded in the HTML, but it is impossible to make a
seperate HTML file for every visitor, right? Then this is probably
because the HTML text is real-time generated by server side scripts.

About your second question, you have to understand what a basic
hostname. The most common hostname is like:
something.somethingelse.com, take www.google.com as an example,
"google.com" is called an domain name, you can imagine it is a
collection of servers (they are neccessary to be a "real" server)
owned by Google, and "www" is the host, which is the name of one of
the servers. So "www.google.com" simply means the server named "www"
in the "google.com", domain, "www.yahoo.com" simply means the server
named "www" in the "yahoo.com" domain. Although the two server have
the same name, they can be distinguished since they are in different
domain. So, a hostname can uniquely identify a server on the internet.
For convinence, the servers are named according to their purpose, HTTP
server is usually named "www", and FTP server is usually named "ftp",
while E-mail server is usually named "mail". This is the reason why
when you want to browser a webpage, you go to the host:
www.xxxxxx.com, and when you want to access to the FTP server you use
ftp.xxxxxx.com

If you have understand what i have said in last paragraph, here is
some more information for your interests. Actually yyy.xxxxxx.com is
simply something like alias for human to remember more easily, each of
them is representing an ip address, which is in the form of
XXX.XXX.XXX.XXX (eg. 123.23.12.33), different hostname may refer to
the same ip address, so in some cases you can actually use
www.xxxxxx.com to connect to a ftp server and use ftp.xxxxxx.com to
connect to the HTTP server. Therefore protocals like ftp:// and
http:// are usually explicitly inputed for the browser to know what
protocal they should use to connect to the server.

Hope this can help you.

Important Disclaimer: Answers and comments provided on Google Answers are general information, and are not intended to substitute for informed professional medical, psychiatric, psychological, tax, legal, investment, accounting, or other professional advice. Google does not endorse, and expressly disclaims liability for any product, manufacturer, distributor, service or service provider mentioned or any opinion expressed in answers or comments. Please read carefully the Google Answers Terms of Service.

If you feel that you have found inappropriate content, please let us know by emailing us at answers-support@google.com with the question ID listed above. Thank you.
Search Google Answers for
Google Answers  


Google Home - Answers FAQ - Terms of Service - Privacy Policy