git.ntnlv.ca
Repositories
Help
Report an Issue
qdmtl-ts.git
Code
Commits
Branches
Tags
Search
Tree:
cd00a0c
Branches
Tags
prod
qdmtl-ts.git
endpoint.php
Error handling
davvalent
commited
cd00a0c
at 2022-05-03 21:32:17
endpoint.php
Blame
History
Raw
<?php if (!empty($_POST)) { require 'parse-ini.php'; require 'vendor/autoload.php'; $config = array( 'db_host' => 'localhost', 'db_name' => $infos['db_name'], 'db_user' => $infos['db_user'], 'db_pwd' => $infos['db_pwd'], 'store_name' => $infos['store_name'], 'max_errors' => 25, /* endpoint */ 'endpoint_features' => array( 'select', 'construct', 'ask', 'describe' // 'load', // 'insert', // 'delete' ), 'endpoint_timeout' => 60, // 'endpoint_read_key' => '', /* optional */ // 'endpoint_write_key' => '', /* optional, but without one, everyone can write! */ // 'endpoint_max_limit' => 250, /* optional */ ); $ep = ARC2::getStoreEndpoint($config); try { if (!$ep->isSetUp()) { $ep->setUp(); } $ep->go(); } catch (Exception $e) { exit('Une erreur est survenue.'); } } ?> <!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml" lang="fr-ca" xml:lang="fr-ca"> <head> <meta charset="utf-8"/> <meta name="viewport" content="width=device-width, initial-scale=1.0"/> <title>QDMTL SPARQL Endpoint</title> <link rel="stylesheet" href="css/normalize.css"/> <link rel="stylesheet" href="css/style.css"/> </head> <body> <h1>QDMTL SPARQL Endpoint</h1> <p>Éditeur de requêtes : <a href="http://qdmtl.ca/sparql">http://qdmtl.ca/sparql</a></p> </body> </html>