Jump to content

Recommended Posts

Good Day to all,

 

Ahm, does anyone here know how can i make a function that get the filepath of a specific file?

 

I want to create a function like this:

- getFilePath('A_file_with_an_unknown_path.inc');

then the function will return the path of the file with an unknown path/directory.

 

Is this possible? If not, can anyone tell me how can I be able to include a file with an unknown filepath/directory?

 

- require_once('???/???/???/A_file_with_an_unknown_path.inc');

 

Please help.

 

Thank you in advance.

Link to comment
https://forums.phpfreaks.com/topic/109815-how-to-find-the-path-of-a-specific-file/
Share on other sites

  • 1 month later...

You can't do anything without knowing the path in the first place.

 

You can do a search but if you have 2 or more files the same, how can you tell which is the right file.

 

It sounds like very bad programming logic to attempt to include scripts that you don't know the path of.

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.