I have been trying to get the current directory link and come up with something like this as:
<?php echo "http://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]paypal_success.php"; ?>
but really that didn't work as I got the output as :
http://localhost/php-login-new/invoice.phppaypal_success.php
so really I want to trim the invoice.php from it so if you can guide me please how I can do that..it will be great..!