Posts

Showing posts from May, 2023

Running PHP file for the first time (Windows)

Image
Running PHP file for the first time (Windows) The simple way to execute PHP is to install and run a web server (included in XAMPP), create a PHP file, place it in a specific directory, and then run it by entering the address in a web browser. Firstly, the Apache web server must be running without fail. It should appear as "STOP" with a red underline, as indicated below. 1. Directory for placing PHP files Once XAMPP installation is complete, you will see two icons on your desktop. The left icon is for server control, and the right icon opens the space for placing PHP documents when double-clicked. By default, the installation address on Windows is as follows: C:\xampp\htdocs You must create and place your PHP files in this location without fail. 2. Creating and saving a PHP file - Open Notepad on Windows and enter the following: Save the file with the name "test.php" in the desired location. The important thing is to select the file format as "All Files" an...

To test PHP on Windows (Install XAMPP)

Image
  To test PHP on Windows (Install XAMPP) If your environment is not suitable for Linux usage, you will need a web server and a database to test PHP language on a Windows environment. Setting up this together can be a bit complicated, so there is a package software available for easy installation. It's called XAMPP. For the installation instructions, you can refer to the website link below, and the original site is https://www.apachefriends.org/. website link : https://phpandmysql.com/extras/installing-xampp/ What I'm going to inform you about is a potential error that may occur after the installation, which is a MySQL execution error. It occurs when there is a port conflict, preventing MySQL from running. In such cases, you can resolve it by changing the port number. In my case, both MySQL and Apache are running, and this is the control panel interface. In the above screen, the red dot indicates the configuration file (my.ini) for opening. Here, you can change the port number f...

Things to consider before learning PHP

 I would like to think about some things to consider before starting. Before learning PHP, I originally had experience with a language called ASP (now known as ASP.NET). However, such programming languages are heavily influenced by the operating system 1.What operating system to use as a server In the case of ASP, it is a language developed by Microsoft and naturally works best with Windows and products developed by Microsoft. PHP, on the other hand, was created by a person named Linus Torvalds and is best suited for the Linux operating system, which is freely distributed. (I used to use Red Hat Linux, but now you have to pay to use Red Hat Linux.) There are other Linux distributions available for free, so you can try using them. Therefore, it is important to decide which operating system to use as a server and for programming. Of course, any operating system can be used interchangeably, but it requires several complex processes and is inconvenient, so typically Linux is used for P...

What is PHP?

  Before we start, let me briefly introduce PHP. PHP is a type of programming language that I used to work with in the past. There are various programming languages, but through this language, you can implement many things. Although it's been a long time since I last used it, I would like to introduce it to you with the intention of studying together. It would be helpful to know what things can be done with PHP. Below is the content introducing PHP from chat GPT. You don't have to read it all; you can simply skim through the bold text and read the parts that interest you PHP is a versatile programming language that can be used to create various programs and applications. Some common types of programs that can be built with PHP include: 1.Web Applications: PHP is primarily used for web development and is adept at creating dynamic and interactive web applications. It can be used to build various types of web applications such as e-commerce websites, content management systems (CM...