Answers for "php cant access parent folder"

PHP
2

php include file in parent directory

//If your server is not resolving the file from the parent directory using
include '../somefilein_parent.php'

//try this (using the parent directory relative to the script):
include __DIR__ . "/../somefilein_parent.php";
Posted by: Guest on June-14-2021
0

get name of parent dir php

<?php
  //OUTPUT name of the parent dir no forward or backward slashes
  //USAGE add the code below to the script you need the parent DIR of, that simple.
  basename(__DIR__);
  //OUTPUT: parentDIR 
?>
Posted by: Guest on November-16-2021

Code answers related to "php cant access parent folder"

Browse Popular Code Answers by Language