Download the PHP package fyyb/express without Composer

On this page you can find all versions of the php package fyyb/express. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package express

Fyyb Express

PHP micro framework that helps you quickly write simple yet powerful web applications and APIs.

Getting started

Installation

Assuming you already have composer knowledge, create a directory to store your application and make it your working directory.

This will include in composer autoload all the necessary dependencies. Requires PHP 7.0 or later!

Usage example

After installing, create the .htacces, config.php and index.php files at the root of your project.

To keep your code separate from the configuration files, we suggest that you use a folder/file structure similar to the one below:

Don't forget to add your application's namespace in the autoload of the composer.json.

.htaccess

To use fyyb/express, it is necessary to redirect all navigation to the root file (index.php), where all traffic must be handled. The example below shows how:

config.php

File where the variables/constants of the project will be defined. If your project directory is different from the root, configure the BASE_DIR constant for the correct operation in identifying the routes.

Hello world

See how easy it is, in your index.php, insert the code below:

This app responds with "Hello, world!" for requests to the root URL (/) or route. For all other paths, it will respond with a 404 not found.

Simple routing

Routing refers to determining how an application responds to a client request to a particular endpoint, which is a URI (or path) and a specific HTTP request method (GET, POST, and so on).

Each route can have one or more handler functions, which are executed when the route is matched.

Route definition takes the following structure:

Where:

The following examples illustrate defining simple routes. Respond with Hello World! on the homepage:

Respond to POST request on the root route (/), the application’s home page:

Respond to PUT request on the root route (/), the application’s home page:

Respond to DELETE request on the root route (/), the application’s home page:

Respond to a GET, POST, PUT and DELETE request to the /user route:

Or customize the methods with map function

Where:

Respond to a GET and POST request to the /test route:


All versions of express with dependencies

PHP Build Version
Package Version
Requires php Version >=7.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package fyyb/express contains the following files

Loading the files please wait ....