0% found this document useful (0 votes)
15 views4 pages

PHP Basics and Framework Overview

PHP is a popular open-source server-side scripting language used for web development, known for its scalability and support for asynchronous programming. The document outlines its applications, including web development, command-line scripting, game development, and real-time applications, as well as key features like easy database handling and a simple learning curve. It also discusses PHP frameworks, particularly CodeIgniter, which follows the MVC architecture for building dynamic websites.
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
15 views4 pages

PHP Basics and Framework Overview

PHP is a popular open-source server-side scripting language used for web development, known for its scalability and support for asynchronous programming. The document outlines its applications, including web development, command-line scripting, game development, and real-time applications, as well as key features like easy database handling and a simple learning curve. It also discusses PHP frameworks, particularly CodeIgniter, which follows the MVC architecture for building dynamic websites.
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

PPT _ 1 PHP BASICS • Scalability: PHP is highly scalable, allowing developers to

create websites that can grow in terms of traffic and


 PHP is a popular open source scripting language mainly functionality.
used in web development.
 It runs on the server side and generates dynamic content • Asynchronous Support: PHP, through the use of libraries
that displayed on a web application. and frameworks like ReactPHP, supports asynchronous
programming, allowing developers to handle multiple
 PHP stands for “Hypertext Preprocessor”. An open- requests concurrently.
source, widely used for web development.
APPLICATION OF PHP
 The latest version of PHP is “PHP 8.4.8” released on June
5, 2025. • Web Development: PHP is widely used for creating
dynamic websites and web applications by generating
o A serve-side language that generates dynamic interactive content, handling user inputs, and interacting
content and interacts with databases, forms, and with databases.
sessions.
• Command-Line Scripting: PHP can be used to write
o Supports easy interaction with databases like command-line scripts for automating repetitive tasks, such
MySQL, enabling efficient data handling as data processing or system monitoring.

• Game Development: PHP is used for backend logic in


browser-based multiplayer games, handling user
authentication, scores, and game state.

• Real-Time Applications: PHP supports real-time


applications like chat systems and live updates, typically
using AJAX or WebSockets.

• File Management: PHP handles file uploads and creates file


management systems for organizing and downloading
files.

LIMITATIONS: Security Risks, Not Ideal for Command-Line and


Limited Support for Multi-threading

COMMENTS: // - single line &&& /* - multi-line

PHP VARIABLES AND DATA TYPES:


Variable is used to store data that can be manipulated within PHP.
They are declared using the “$” (dollar sign) symbol followed by the
variable name.
KEY FEATURES OF PHP:
Declaring Variables - are created by assigning a value to them
• Client-Side Scripting: PHP can generate using the assignment operator (=)
dynamic HTML that is sent to the browser. While it runs on
the server, the content it generates can be displayed in PHP FUNCTIONS:
the client’s browser.
 function in PHP is a self-contained block of code that
• Database Handling: PHP easily connects to databases performs a specific task.
like MySQL, PostgreSQL and SQLite, allowing for efficient  It can accept inputs (parameters), execute a set of
data management and storage in web applications. statements, and optionally return a value.

• Simple Learning Curve: PHP’s syntax is easy to learn,


especially for those with basic knowledge of HTML and
programming concepts.

• Rich Ecosystem: PHP offers many libraries and frameworks


like Laravel and Symfony, which make development faster
and more efficient.
PPT 2 _ PHP AND MYSQL INTEGRATION

 MySQL is an open-source relational database management


system (RDBMS). It is the most popular database system
PHP ITERATION/LOOPS:
used with PHP.
In PHP, Loops are used to repeat a block of code multiple times  The data in a MySQL database are stored in tables which
based on a given condition. consist of columns and rows.

PHP provides several types of loops to handle different scenarios,


including while loops, for loops, do...while loops, and foreach loops
Common features: routing, templating, database handling, and
security.

PHP Framework Examples: Laravel, CodeIgniter, Symfony, Yii


etc.

CODEIGNITER

MAY LESSON DIN ABOUT CRUD – wag na isali, basic naman.

PPT 3: INTRODUCTION TO MVC AND WEB FRAMEWORKS


A “PHP framework” is a pre-built platform that provides a
foundation and tools for building web applications with PHP
programming language.

• MVC – MODEL VIEW CONTROLLER : is an CODEIGNITER 4: A lightweight and fast PHP framework for
architectural/design pattern that separates an application building dynamic websites.
into three main logical components (Model, View, and
• Built on MVC architecture.
Controller)
• Ideal for small-to-medium projects.
• It was traditionally used for desktop graphical user
• Released under the MIT license (free and open source).
interfaces (GUI’s).
• It was created or developed by: “Trygve Reenskaug”

When a user visits a blog post:

• Controller receives the request

• Model retrieves the post from the database

• View displays the post using HTML template

KEY FEATURES:

• MVC-based structure
• Built-in routing and CLI tools
• Security features (CSRF, XSS protection)
• Database migrations and query builder
• Template engine support
• Fast performance (small core size)

MVC Flow Diagram (steps)

1. User requests a URL (e.g., /home).


2. Router directs the request to a specific controller. Ci4 SYSTEM REQUIREMENTS:
3. Controller requests data from Model.
4. Model returns data to Controller. • PHP: Version 8.1 or higher
5. Controller sends data to the View. • Composer: Version 2.0.14 or newer
6. View renders the final HTML and sends it back to the • Extensions: intl, mbstring, json, mysqli, openssl
browser. • Server: Apache or Nginx with mod_rewrite enabled

ADVANTAGES: RUNNING Ci4 project locally:

• Modular Development: Each part can be developed • In project folder run: php spark serve
independently. • Open browser and visit : [Link]
• Maintainability: Easier to fix bugs or extend features. • If successful, you’ll see the Welcome to Codeigniter 4 page
• Scalability: Perfect for larger applications.
• Collaboration: Multiple developers can work RUNNING Ci4 project via XAMPP:
simultaneously on different parts.
1. Copy your CodeIgniter project folder to htdocs.
A web framework is a collection of tools and libraries that 2. Ensure public/ folder is the web root.
streamline web app development. 3. Start Apache and MySQL in XAMPP.
4. Access the app via browser: [Link]

You might also like