Skip to content
This repository was archived by the owner on Mar 2, 2024. It is now read-only.

Commit ae82fcb

Browse files
authored
Add files via upload
1 parent df96d4b commit ae82fcb

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

API/function.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
11
<?php
2-
32
/*
43
* 添加访问记录
54
* @return bool 添加是否成功
65
*/
76
function addAccess()
87
{
9-
require '../Core/Database/connect.php';
8+
require __DIR__ . '/../Core/Database/connect.php';
109

1110
$host = $_SERVER["HTTP_HOST"] . $_SERVER["SCRIPT_NAME"] . '?' . $_SERVER['QUERY_STRING'];
1211
$user_agent = $_SERVER["HTTP_USER_AGENT"];
@@ -29,7 +28,7 @@ function addAccess()
2928
*/
3029
function addApiAccess($id)
3130
{
32-
require '../Core/Database/connect.php';
31+
require __DIR__ . '/../Core/Database/connect.php';
3332
if (intval($id)) {
3433
$get_access = $db->query("SELECT access FROM `mxgapi_api` WHERE `id` = '{$id}';");
3534
if ($get_access) {

0 commit comments

Comments
 (0)