jakbin / php_pdo_rest_api

Api using Php Pdo

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Php Pdo rest api

GitHub Contributors GitHub commit activity GitHub last commit Php 7.4+

This is only example, You need to modify for your own use.

  1. Clone the repo
git clone https://github.com/jakbin/php_pdo_rest_api.git
  1. Then create database.

create a database name with "api".

create database api;
CREATE TABLE `apiTest`.`api` ( `id` INT NOT NULL AUTO_INCREMENT , 
	`fname` TEXT NOT NULL , 
	`lname` TEXT NOT NULL , 
	PRIMARY KEY (`id`)) ENGINE = InnoDB;

Or

import "apiTest.sql" file into your database.

  1. Start mysql server.

  2. Start api server. s

php -S 127.0.0.1:8080 -t php_pdo_pdo_api/

About

Api using Php Pdo


Languages

Language:PHP 100.0%