Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

174
Visualizações
open_basedir does not seem to set the base path

On my Synology (linux) server I have set-up three Apache2.4 / PHP web environment with the roots being:

/volume1/web
/volume1/webDevZone
/volume1/webTstZone

I would like to have a mechanism where I can call something like echo $_SERVER [DOCUMENT_ROOT] and get / regardless what environment I am running on. This way when I can call includes or require without needing to change things as I move my application from one environment to the other.

Unfortunately, _ DIR _ does not do the trick as it does not returns / (the desired result). Instead it returns the full path of a file. So if the file is nested a few levels, then _ DIR _ returns all levels.

I'm thinking that the solution would not be a PHP one, but rather an Apache one.

I was hoping that open_basedir do it, but it doesn't seem so.

Any idea?

Thanks

over 4 years ago · Santiago Trujillo
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda