Page 1 of 1
New to server dev, PHP etc.
Posted: Sat Feb 12, 2011 2:37 am
by cvcs1
Hello,
I am going to sound really dumb, but when I create a PHP file (i don't know how to do this yet..) and put code in it then put it on a server, how exactly does my server know when to run it? how?
Thanks!
Re: New to server dev, PHP etc.
Posted: Sat Feb 12, 2011 5:13 am
by Darhazer
cvcs1 wrote:Hello,
I am going to sound really dumb, but when I create a PHP file (i don't know how to do this yet..) and put code in it then put it on a server, how exactly does my server know when to run it? how?
Thanks!
If we are talking about a web application, it is running it when HTTP request to that file arrives

In other words, when you type the URL to the PHP file, the code is runned and the output is send to the browser
Re: New to server dev, PHP etc.
Posted: Sat Feb 12, 2011 1:06 pm
by cvcs1
Ah, this makes sense

, If I were to be accessing information from a different device (iPhone) using a get method (i think) how does this work?
Re: New to server dev, PHP etc.
Posted: Sat Feb 12, 2011 1:41 pm
by Darhazer
cvcs1 wrote:Ah, this makes sense

, If I were to be accessing information from a different device (iPhone) using a get method (i think) how does this work?
The same way - it's the HTTP protocol that takes care of this
