Create an account

Very important

  • To access the important data of the forums, you must be active in each forum and especially in the leaks and database leaks section, send data and after sending the data and activity, data and important content will be opened and visible for you.
  • You will only see chat messages from people who are at or below your level.
  • More than 500,000 database leaks and millions of account leaks are waiting for you, so access and view with more activity.
  • Many important data are inactive and inaccessible for you, so open them with activity. (This will be done automatically)


Thread Rating:
  • 633 Vote(s) - 3.43 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Return current web path in PHP

#11
What you are looking for is the WEBROOT of your application based on your description. The checked answer is, by far, the closest answer.

The easiest way to identify the webroot is to have it be user defined, as was mentioned by Annika and noted in a comment.

However, there is a bit of information that was overlooked:

If you are trying to identify the location of the webroot, which coincidentally is also the top level of your framework, then you could use something like this:
```php
$web_only_path = dirname($_SERVER['PHP_SELF']);
```
This will only work if your rewrite conditions are implemented correctly.

If they are in an **htaccess** file, no sweat.

However, if they are in an apache conf file. Then they **must** be contained within a <Directory /path/label/> </Directory> container for the SERVER variable to store and return the proper information after working through the redirects when dealing with the SEO friendly URLs.

See:[SCRIPT_NAME and PHP_SELF with mod_rewrite in .conf](

[To see links please register here]

)
Reply



Forum Jump:


Users browsing this thread:
1 Guest(s)

©0Day  2016 - 2023 | All Rights Reserved.  Made with    for the community. Connected through