Monday, May 24, 2010

How does php scripting work?

How does php scripting actually work? What is php? Can anyone explain php scripting in a nutshell? Any example of work or project done by php scripting? Thanks people.

How does php scripting work?
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.





That is directly from http://www.php.net/





My description...


PHP is a programming language primarily used for developing client-server website applications. It is frequently paired with MySQL databases to perform various data-driven applications such as shopping carts, forums, photo albums, social networking sites, etc...The PHP code resides on the server and generates HTML pages that the client's web browser parses so you see an actual HTML page, not the underlying PHP code when you visit the website. If you come across any web page that ends in .php instead of .html then that page is being generated by PHP code. Good examples of PHP code would be phpBB, the forum application, and Joomla, the content management system.
Reply:PHP actually runs on the web server sending only the output to the client. A lot of people like it because the code can not get stolen like java script or perl. With PHP you can communicate with databases, read files, etc. Quite a few web sites uses PHP these days because it allows you to create dynamic web pages based. You can even use it to combine pictures or otherwise modify them. Have you noticed that quite a few websites are going to a security question login. My bank even uses a picture around the login that I chose. If the picture is not present and not the one I chose, they say to contact them because it is not their site. I am sure that is PHP because they have overlaid the date on the picture and login (probably CSS).
Reply:php scripts contain code written in the php programming (or scripting) language, and interlaced html code. The server on which the php scripts reside must have the capacity to interpret php. When you request a php file via web browser (a http request), the web server first runs that php script, to generate the html code to be sent to your web browser. The html code therefore will depend on the input you provided, or perhaps some data obtained from a database. PHP therefore generates html code on the fly (or dynamically) as opposed to a static html file residing in the server.
Reply:To put it simple the it it a server side scripting language meaning that the web server handles all the coding instead of the client





a simple bit of PHP would be hello world:





%26lt;?php


echo "Hello World!";


?%26gt;
Reply:A PHP engine receives some coded instructions, it acts on those instructions, and passes its output somewhere.





http://php.net/ has a lot of information.





Large chunks of Yahoo! are written in PHP.


No comments:

Post a Comment