I cant seem to get the realpath function to work with variables is there a way I can fix this? When I use variables in the function it returns nothing I know the pathname works
Does the path really exist? As for the realpath function to work, the path has to be a valid and existing location.
So if you are using .htaccess to create "pseudo" paths, the realpath function will not work on them. The use of variables inside should not matter (given that they are populating fine and are correct), as all it really requires is a valid string.