Есть ли динамический способ потребовать/включить файл php?Php

Кемеровские программисты php общаются здесь
Ответить Пред. темаСлед. тема
Anonymous
 Есть ли динамический способ потребовать/включить файл php?

Сообщение Anonymous »


Im developing a rest API using PHP and I needed to use a file in two differents endPoints. In the case I have a Login/Register endpoint and a Orders endpoint that are using my tokenService that I'm showing bellow.

The problem is that my structure of folders make the

require_once('../../index.php') work only when requiring the token service by the auth endpoints, because they're in Src/Routes/Auth folder, and work with

require_once('../index.php') when accessed by the order endpoint, which is just in Src/Routes.



Источник: https://stackoverflow.com/questions/780 ... a-php-file
Реклама
Ответить Пред. темаСлед. тема

Быстрый ответ

Изменение регистра текста: 
Смайлики
:) :( :oops: :roll: :wink: :muza: :clever: :sorry: :angel: :read: *x)
Ещё смайлики…
   
К этому ответу прикреплено по крайней мере одно вложение.

Если вы не хотите добавлять вложения, оставьте поля пустыми.

Максимально разрешённый размер вложения: 15 МБ.

  • Похожие темы
    Ответы
    Просмотры
    Последнее сообщение

Вернуться в «Php»