Jump to content

Relative Path


ainoy31

Recommended Posts

Directory structure:

 

/home/~test/public_html/soap/

    .../xml/

    .../bin/

    .../products/browser/

 

In file /home/~test/public_html/soap/bin/products/browser/test.php, I include another file and call it's function:

require("../../xml/processXML.php");

$xmlData = generateXML(....);

 

In the /home/~test/public_html/soap/xml/processXML.php, I have the following code:

function generateXML()
{
     exec("../bin/code.cur");
}

 

The problem is the exec("../bin/code.cur") fails of the relative path issue.  I did a getcwd() before the exec() and it returned /home/~test/public_html/soap/bin/products/browser.  I have tried using dirname() and no help.  I hope this is clear enought to understand where I am coming from.

 

Thank you.

AM

 

 

 

Link to comment
https://forums.phpfreaks.com/topic/233856-relative-path/
Share on other sites

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.