anon Posted July 3, 2007 Share Posted July 3, 2007 I have recently installed PHP and Apache on my local computer. I THINK that PHP is working, but everytime i go to localhost to check, it shows a directory with a file called PHPinfo.php.txt. This file is supposed to be able to tell you everything about PHP, so i clicked on it, and there's a clean page with the writing "<?php phpinfo(); ?>" in the top corner. I can't understand why it doesn't show that page with all the information, please tell me why it doesn't work! I think it has something to do with the file extension being .php.txt. Please help! Quote Link to comment Share on other sites More sharing options...
trq Posted July 3, 2007 Share Posted July 3, 2007 Remove the .txt extension. Quote Link to comment Share on other sites More sharing options...
anon Posted July 3, 2007 Author Share Posted July 3, 2007 I don't know how to, it always adds that, no matter what kind of extension, except html. I tried a .bat extension for something else, and it just opened the text document. it was saved as phpfolder.bat.txt! How do i change this? Quote Link to comment Share on other sites More sharing options...
trq Posted July 3, 2007 Share Posted July 3, 2007 Sounds like a text editor issue. I dont use windows, but there may be some default setting. What editor are you using? Quote Link to comment Share on other sites More sharing options...
wildteen88 Posted July 3, 2007 Share Posted July 3, 2007 I don't know how to, it always adds that, no matter what kind of extension, except html. I tried a .bat extension for something else, and it just opened the text document. it was saved as phpfolder.bat.txt! How do i change this? I guess you are using notepad. Whn you go to save files in notepad it will always add a .txt file extension even if you have already defined one. To stop notepad from adding the .txt extension make sure the File Type field is set to All Files and not Text Document before you click the save button. Also make sure you save your php files in C:/wamp/www if you have WAMP installed. When you want to run your php files go to http://localhost/name-of-file-to-run-here.php - change name-of-file-to-run-here.php with your actual php file you want to run. Quote Link to comment Share on other sites More sharing options...
anon Posted July 4, 2007 Author Share Posted July 4, 2007 I have tried all these methods, yet it still saves as .php.txt. I did save it as an html file and it worked, so its fine. Quote Link to comment Share on other sites More sharing options...
wildteen88 Posted July 4, 2007 Share Posted July 4, 2007 What editor are you using. Quote Link to comment Share on other sites More sharing options...
markjoe Posted August 1, 2007 Share Posted August 1, 2007 Sounds like one of the Windows features that makes me want to bang my head on the monitor. Open any folder, click the 'Tools' menu, select the 'Folder Options' menu item, click the 'View' tab, uncheck 'Hide extensions for known file types', click 'Apply' or 'OK' You can now see the .txt extension in the Explorer (Not Internet Explorer) window and rename the file to remove it. Quote Link to comment Share on other sites More sharing options...
anon Posted August 3, 2007 Author Share Posted August 3, 2007 Thank you very much!!! Finally! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.