This repository is designed to teach PHP from the beginner level to the expert level. It contains various examples and exercises to help you learn and practice PHP.
- Introduction
- Getting Started
- Directory Structure
- Prerequisites
- Installation
- Docker Setup
- Usage
- Contributing
- License
This repository is a comprehensive guide for learning PHP. It is divided into multiple sections, each focusing on different aspects of PHP programming.
Follow the instructions below to get started with this repository.
- PHP installed on your machine
- A web server such as Apache or Nginx
- A database server such as MySQL
- Docker and Docker Compose installed on your machine
- Clone the repository:
git clone https://github.com/KARSTERR/php-beginner-to-expert.git
- Navigate to the project directory:
cd php-beginner-to-expert
This project includes a Dockerfile
and docker-compose.yml
file to easily set up and run the environment using Docker.
- Ensure Docker is running on your machine.
- Build the Docker image with the following command:
This command will create an image named
docker build -t php-beginner-to-expert .
php-beginner-to-expert
based on theDockerfile
in the project directory.
-
Start the container using Docker Compose:
docker-compose up -d
This command:
- Starts the container in detached mode.
- Automatically sets up the services defined in the
docker-compose.yml
file.
-
Visit the following address in your browser:
http://localhost:8080
(Change the port in the
docker-compose.yml
file if necessary.)
To stop the running container:
docker-compose down
This command stops and removes the container but does not delete the created image.
To clean up by removing the created image:
docker rmi php-beginner-to-expert
- Start your web server and navigate to the project directory.
- Open your browser and go to
http://localhost/php-beginner-to-expert
(or use the port defined in your Docker setup).
Contributions are welcome! Please read the contributing guidelines first.
This project is licensed under the MIT License - see the LICENSE file for details.