Skip to main content

Beginning with PHP development with your first php code.

PHP is a server scripting language that is mainly suitable for web page or web application development. PHP pages can also have HTML, CSS and Javascript  in it. By default PHP can be write in a file with .php extension like 'filename.php'.

System Requirements  for PHP Development:

(On Window OS)

The all in one solution for PHP development on window machine are : WAMP and XAMPP server stack that have web server (Apache) , PHP and database server (Mysql) in it.

You can download WAMP server from here or the XAMPP server from here.

One of the best thing with these server is that they are open source and free to use.

Tools you can use:

Notepad++ : This is a text editor that can be used to write your PHP code.

Download the Notepad++ from here.


Step to write you first PHP code:
  • Install the WAMP/XAMPP server.
  • Create a new file in Notepad++ (Or any text editor you have)
  • Write the below code in the file.
Code of index.php file
  • Save the file as "index.php" in the C:\wamp\www\ folder in WAMP server or C:\xampp\htdocs\ folder in XAMPP server. 
  • Go to web browser like Mozilla or Internet Explorer.
  • Write http://localhost/index.php in the address bar.
That done  you will see the following output.
Output of index.php file

Enjoy your first php code. Happy coding :)

Comments

Popular posts from this blog

The Great Architectures of Bijawar, Chhatarpur, M.P.

Bijawar, Temple Janki Niwash Bijawar, Temple Janki Niwash   Maharaja Palace of Bijawar - A very royal palace of the Great Maharaja Ji of Bijawar. The palace has a great eye caching architecture. It stands tall with its mirror image on a big Talab in front of it. The palace is become very old and loosing its age at a rapid pace. Unfortunately its to late to restore the Bijawar palace infrastructure but one should create Bijawar palace replica or model to preserve its beauty and architecture. This photo of the palace is the first photo taken and publish on the web. That time there was no good cameras available but as said Old is Gold.

Kashmir off views

Khasmir1 Khasmir2 Khasmir3 Khasmir4 Khasmir5

Unsubscribing an observer while running create, update or delete operations on modal in Laravel

Today I was trying to copy some data from one application to another application. The Data has some nested relationships so I created a custom feature to fetch the data using Apis and insert them one by one into my destination application. My problem while inserting the data was, there was an observer is set to File.php (for example) model that was running run logic to upload the incoming file to AWS s3 Cloude storage. But I am not really uploading anything while inserting the data. So, I want to stop the Observer from running the functionality while I was running my custom feature. While looking for some solution to my problem I came to a solution that I would like to share with you. File::unsetEventDispatcher(); I used this function call before running the logic only once and my observer stopped executing the code on Create and Update model event. You can also use the same code to stop the other event from executing while running some logic. You can get all the event displachers and ...