Code Monkey home page Code Monkey logo

restaurants_camposjose's Introduction

About this repository

  • Name: Task 4.1 - Restaurants
  • Author: José Pedro Campos Pérez
  • Subject: Web Applications Implementation
  • Institute: IES Francesc de Borja Moll
  • Year: 2018-2019

PHP

  1. What is PHP?
  2. Tools needed
  3. Syntax
  4. Installation
    1. XAMPP

What is PHP?

PHP: Hypertext Preprocessor, or simply PHP, is a server-side scripting language designed for Web development, and also used as a general-purpose programming language.
With PHP we can work with cookies, form process, generate dynamic content, send e-mails, ... One of the advantages of PHP is its compatibility to access data in almost any system of storage from XML to database applications. Moreover, PHP can be harness in any operative system, Linux, Unix, Windows, Mac-OS, ...; and supporting the different web servers: Apache, Microsoft IIS, iPlanet, Caudium, ...
PHP code may be embedded into HTML code, or it can be used in combination with various web template systems, web content management systems, and web framework.

Tools needed

The PHP language is a plain text language. So basically, to program a web in PHP we can use development tools like any plain text editor, such as Windows Notepad.
Of course, there are much more powerful tools that allow you to develop in an easier and more intuitive way, with preview windows, autocomplete options, error marks, ...; like:

Syntax

The PHP interpreter only executes the code that is among its delimiters. The most common delimiters are to open <?php and to close ?>. The purpose of these delimiters is to separate the PHP code from the rest of the code, such as HTML.

<!DOCTYPE html>
<html lang="es">
    <head>
        <meta charset="UTF-8"/>
        <title>Basic PHP</title>
    </head>
    <body>
        <?php
            echo 'Hello World!';
        ?>
    </body>
</html>

Installation

To be able to execute the PHP scripts, first of all, you need a web server to be able to interpret this programming language. To do this, it has to be complemented with a PHP interpreter. In this sense, it is a software component that can identify the passages of a file that contain PHP code. In principle, PHP can be executed on any web server and the interpreter is part of the PHP download package. The current version can be downloaded for free from the official website of the php.net project.
In practice, PHP is often used in combination with the Apache HTTP Server. If this connection is completed with the MySQL or MariaDB database, one can speak, depending on the operating system, of LAMP (Linux), WAMP (Windows) or MAMP (Mac-OS).
Web stacks of this type are offered as pre-configured software stacks. To learn PHP it is recommended to use the complete XAMPP package, which contains the local installation of the Apache web server, the MariaDB database system and the Perl and PHP programming languages.

XAMPP

XAMPP

XAMPP is an independent platform server, free software, consisting mainly of the MySQL database, the Apache web server and the interpreters for scripting languages: PHP and Perl. The name comes from the acronym of X (for any operating systems), Apache, MySQL, PHP, Perl. The program was releases under the GNU license and acts as a free Web server, easy to use and capable of interpreting dynamic pages.
To test this task, or to be able to hand web pages that you do, is necessary to have a web server. On the Internet, there are many companies that offer posting services and make it available from a space already set up to upload the files and upload the web to dedicatd machines that you can configure yourself.
XAMPP is a light software that can be used on any PC. It does not need many resources.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.