I am trying to test my work enviorment with a "test.php" with one line "<?php phpinfo(); ?>" (made in notepad, i've read that can be done, im suspicious). Then putting it in the apache/htdocs folder. Now I test it by puting http://localhost/test.php in the web browser. I get webpage does not exist, but if I run http://localhost/test.php.txt I get "http://localhost/test.php" displayed only.

Basicly how do I make a .php file that isn't a txt file?

Thank You

    I don't understand what you're saying...

    If you add the .txt extension to the path, you see the contents of 'test.php' in your browser?? Any chance you can give us links/screenshots/examples of the output? If you named the file 'test.php' and you typed that into your browser, you should either see the PHP's phpinfo() output or, at the very least, a file download screen (indicating PHP isn't properly set up in Apache).

    You mentioned this is your test work environment, so I don't know if you would want to post link to your server on this board, but feel free to PM me the URL to take a look at. Otherwise, I'm a bit confuzzled.

      i think the problem is that you have the folder option "hide extensions for known file types" so when you save the file in notepad or whatever its saving it as test.php.txt but since txt is known, its only showing test.php in the folder view. just go to tools->folder options->view tab and uncheck the box. then refresh the folder and you can rename the file without the .txt

      the problem is in notepad if you save the file as xxx.php and the dropdown for file type is text document it appends .txt to it. you will hve to switch the dropdown to say all files and then use the .php extension.

        Teehee, now I feel stupid. Of course that's what's happening. Thanks drew 🙁

          Thanks from me too, worked perfectly.

            Write a Reply...