Reputation: 33080
Say I run
http://mymaindomain.com/helloworld/somescript.php
I want http://mymaindomain.com/helloworld/
How do I do so?
Upvotes: 0
Views: 53
Reputation: 1383
Would you please check my answer?
https://stackoverflow.com/a/41407858/3821823
You can also define const variable like this:
const BASE_URL = 'http://mymaindomain.com/helloworld/';
// or
define('BASE_URL', 'http://mymaindomain.com/helloworld/');
echo BASE_URL;
Upvotes: 1