i hve started learning php but when i run php code it displays the script instead of interpreting it.my servers are installed properly and i have saved file in .php extension but in browser it shows as .php.txt file how should i get it correct?
php files are showing as php.txt
Page 1 of 14 Replies - 924 Views - Last Post: 21 October 2011 - 05:55 PM
Topic Sponsor:
Replies To: php files are showing as php.txt
#2
Re: php files are showing as php.txt
Posted 28 August 2011 - 10:28 PM
That's more than likely happening because of the text editor your using and the way you're saving.. I'm not sure this is accurate, but I'm assuming you're using notepad. You may need to select "All File Types" or something when saving. I use notepad++ when coding. I also use Aptana 3 for a lot of projects.
#3
Re: php files are showing as php.txt
Posted 28 August 2011 - 10:33 PM
soniya_php, on 29 August 2011 - 12:49 AM, said:
my servers are installed properly and i have saved file in .php extension
I doubt it. This is what happens when your web server is not listening for php file extensions.
If your files are getting a .txt extension added to them, then as EnvXOwner suggested it is likely from how you are saving the file. If you are using notepad for example, it could auto save with .txt, correct the file name before you upload it.
** moved to web servers & hosting **
Question has nothing to do with the php language.
#4
Re: php files are showing as php.txt
Posted 05 September 2011 - 02:30 PM
Most likely what is going on here, like everyone had said, is that whatever software you are using is appending a '.txt' extension to the file. If you are using Windows, which I'm assuming you are, you can go under folder options and set it to show all file extensions. That is most likely your problem.
#5
Re: php files are showing as php.txt
Posted 21 October 2011 - 05:54 PM
Your text editor has .txt automatically enabled when it comes to saving. If possible, click Save As > All Files> Make sure file path is .php.
That should work, works on wordpad and notepad. If your a windows user, works with Tomboy notes for Ubuntu and a lot of others work.
That should work, works on wordpad and notepad. If your a windows user, works with Tomboy notes for Ubuntu and a lot of others work.
Page 1 of 1
|
|

New Topic/Question
Reply


MultiQuote






|