file_exists not working with localhost URL
问题 I have this piece of code in PHP: if (file_exists($_POST['current_folder'])) { //do something } But file_exists always returns false. The value passed to the function is: echo $_POST['current_folder']); //This prints: http://localhost/wordpress/wp-content/music I also tried with different folders on the localhost. The function always returns false. I also tried is_dir() . But even this function returns false with the above URL. There are many related questions on Stack Overflow. But most of