update api
This commit is contained in:
10
geoapi/api/api.php
Normal file
10
geoapi/api/api.php
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
<?php
|
||||||
|
include_once "../../global.inc.php";
|
||||||
|
require_once PATH_3PARTY."/Slim/Slim.php";
|
||||||
|
\Slim\Slim::registerAutoloader();
|
||||||
|
|
||||||
|
class api extends \Slim\Slim {
|
||||||
|
//put your code here
|
||||||
|
}
|
||||||
|
|
||||||
|
?>
|
||||||
7
geoapi/config/config.db.php
Normal file
7
geoapi/config/config.db.php
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
/*
|
||||||
|
* To change this template, choose Tools | Templates
|
||||||
|
* and open the template in the editor.
|
||||||
|
*/
|
||||||
|
?>
|
||||||
7
geoapi/config/config.php
Normal file
7
geoapi/config/config.php
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
/*
|
||||||
|
* To change this template, choose Tools | Templates
|
||||||
|
* and open the template in the editor.
|
||||||
|
*/
|
||||||
|
?>
|
||||||
7
geoapi/database/mysql.php
Normal file
7
geoapi/database/mysql.php
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
/*
|
||||||
|
* To change this template, choose Tools | Templates
|
||||||
|
* and open the template in the editor.
|
||||||
|
*/
|
||||||
|
?>
|
||||||
7
geoapi/global.inc.php
Normal file
7
geoapi/global.inc.php
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
<?php
|
||||||
|
define("PATH_ROOT", dirname(__FILE__));
|
||||||
|
define("PATH_SERVICES", PATH_ROOT. "/service");
|
||||||
|
define("PATH_3PARTY", PATH_ROOT . "/thirdparty");
|
||||||
|
define("PATH_API", PATH_ROOT . "/api");
|
||||||
|
define("PATH_DATABASE", PATH_ROOT. "/datebase");
|
||||||
|
?>
|
||||||
@@ -1,14 +1,4 @@
|
|||||||
|
|
||||||
<?php
|
<?php
|
||||||
require 'Slim/Slim.php';
|
echo "Welcome to GeoApi";
|
||||||
\Slim\Slim::registerAutoloader();
|
|
||||||
|
|
||||||
|
|
||||||
$app = new \Slim\Slim();
|
|
||||||
|
|
||||||
$app->get('/hello/:name', function ($name) {
|
|
||||||
echo "Hello, $name";
|
|
||||||
});
|
|
||||||
|
|
||||||
$app->run();
|
|
||||||
?>
|
?>
|
||||||
|
|||||||
@@ -1,4 +1,6 @@
|
|||||||
include.path=${php.global.include.path}
|
ignore.path=
|
||||||
|
include.path=\
|
||||||
|
${php.global.include.path}
|
||||||
php.version=PHP_54
|
php.version=PHP_54
|
||||||
source.encoding=UTF-8
|
source.encoding=UTF-8
|
||||||
src.dir=.
|
src.dir=.
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
<type>org.netbeans.modules.php.project</type>
|
<type>org.netbeans.modules.php.project</type>
|
||||||
<configuration>
|
<configuration>
|
||||||
<data xmlns="http://www.netbeans.org/ns/php-project/1">
|
<data xmlns="http://www.netbeans.org/ns/php-project/1">
|
||||||
<name>PhpProject1</name>
|
<name>GeoApi</name>
|
||||||
</data>
|
</data>
|
||||||
</configuration>
|
</configuration>
|
||||||
</project>
|
</project>
|
||||||
|
|||||||
13
geoapi/service/helloservice/index.php
Normal file
13
geoapi/service/helloservice/index.php
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
|
||||||
|
<?php
|
||||||
|
include_once "../../global.inc.php";
|
||||||
|
require_once PATH_API."/api.php";
|
||||||
|
|
||||||
|
$app = new api();
|
||||||
|
|
||||||
|
$app->get('/hello/:name', function ($name) {
|
||||||
|
echo "Hello, $name";
|
||||||
|
});
|
||||||
|
|
||||||
|
$app->run();
|
||||||
|
?>
|
||||||
Reference in New Issue
Block a user