Jump to content

Open file above root directory


canadabeeau

Recommended Posts

Initialize the function:

$DOCUMENT_ROOT = $_SERVER['DOCUMENT_ROOT']

 

then use the syntax:

fopen = "$DOCUMENT_ROOT/Folder/file";

 

you can also use the "."  if you know the UP amount.

 

I hope this will help

 

That opens a file within a directory structure that is within the document root, not outside of it.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.