parent
ff41df4d6b
commit
06abc31067
@ -0,0 +1,4 @@
|
||||
/**
|
||||
* This constant defines the API endpoint.
|
||||
*/
|
||||
export const API = import.meta.env.VITE_API_ENDPOINT;
|
@ -0,0 +1,16 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* relative path of the public directory from the server's document root.
|
||||
*/
|
||||
function get_public_path() {
|
||||
// find the server path of the index.php file
|
||||
$basePath = substr(__DIR__, strlen($_SERVER['DOCUMENT_ROOT']));
|
||||
|
||||
$c = $basePath[strlen($basePath) - 1];
|
||||
|
||||
if ($c == "/" || $c == "\\") {
|
||||
$basePath = substr($basePath, 0, strlen($basePath) - 1);
|
||||
}
|
||||
return $basePath;
|
||||
}
|
Loading…
Reference in new issue