Upper or Lower Case Issue using get_file_contents php -


I am using a PHP GET method to get a filename that is placed in the get_file_contents command. If this is possible, then I want to ignore the letter case so that my URL is cleaner.

For example, example.com/file.php?n=File-Name will work, but example.com/file.php?n=file-name does not work using the code given below Will do I think it should be easy, but I'm dry. any idea? $ file = $ _GET ['n']; $ File_content = file_get_contents ($ file);

shorten all your file names and use:

  file_get_contents (strtolower ($ file));   

(I hope you know about some people involved in using this.)

Comments

Popular posts from this blog

php - PDO bindParam() fatal error -

logging - How can I log both the Request.InputStream and Response.OutputStream traffic in my ASP.NET MVC3 Application for specific Actions? -

java - Why my included JSP file won't get processed correctly? -