New to server dev, PHP etc.

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
cvcs1
Forum Newbie
Posts: 2
Joined: Sat Feb 12, 2011 2:32 am

New to server dev, PHP etc.

Post 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!
User avatar
Darhazer
DevNet Resident
Posts: 1011
Joined: Thu May 14, 2009 3:00 pm
Location: HellCity, Bulgaria

Re: New to server dev, PHP etc.

Post 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
cvcs1
Forum Newbie
Posts: 2
Joined: Sat Feb 12, 2011 2:32 am

Re: New to server dev, PHP etc.

Post by cvcs1 »

Ah, this makes sense :D , If I were to be accessing information from a different device (iPhone) using a get method (i think) how does this work?
User avatar
Darhazer
DevNet Resident
Posts: 1011
Joined: Thu May 14, 2009 3:00 pm
Location: HellCity, Bulgaria

Re: New to server dev, PHP etc.

Post by Darhazer »

cvcs1 wrote:Ah, this makes sense :D , 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 :)
Post Reply