I have a website in my local computer. I am using wamp server to run my website.
URL for website is http://localhost/mywebsite/
I put a PHP file in my website inside folder mywebsite/component/add/files/add.php
So the actual path of file is c:\\wamp\www\mywebsite\component\add\files\add.php
.
I want to show path c:\wamp\www\mywebsite in my file.
How can I get it? And in future when I move my site to somewhere else, I don't need to change path manually. It must be update automatically. Is there any function for this?
e.g. If I move my site in mywebsite/demo, the path will be C:\wamp\www\mywebsite\demo
I hope this is clear to understand. I don't want to show http://localhost/mywebsite path there.
Can anyone help me ???