daria_alexeeva — 2013-12-29T09:57:08-05:00 — #1
I am a novice programmer. The point is that I created a whole website with a php extension, because I had read a few sources that if you want to create a website with php, you need all your pages to do with a php extension, but I have a page as Registration, enter personal Cabinet, shopping cart, these pages I have also a php extension, although if I understand it correctly, pages: Registration, enter personal Cabinet - a must-have extensions to html. Even if I understand correctly, then change the file extension, for example with php to html in normal Notepad Windows7, as people say, a file with the changed file extension may not work: what will turn on the system whether DOS, or some other (don't remember) which will bring failure. But the sort of know that if you change the extension of the file in Notepad++, then everything will be fine: I think in Notepad++, there's a feature that allows you to change the file extension (without causing harm to file with the changed file extension). I still create all your pages using a standard Notepad windows7.
Do I need to change the extension of the pages of the site Registration, enter personal Cabinet, a Basket of the buyer on the html? Excuse me please if I do not understand something. I am only learning.
Tell me, please, whether you want to switch to Notepad++? It really so good?
Thanks in advance.
phpdev — 2013-12-30T10:43:43-05:00 — #2
If I understand correctly, you want to show some .php files as .html files?
If so, take a look at:
Enter something like:
RewriteRule ^/?test.html$ test.php [L]
into your .htaccess file.
If you just change the file extension from PHP to HTML then the server will not know it's a PHP file and won't process it correctly.
lorenw — 2013-12-30T11:15:49-05:00 — #3
I would just leave the php extension, no harm in doing so.
Possibly even better if you leave it as php if in a few years you may want to add some php to those files.
All of my files are .php whether they contain php or not.
daria_alexeeva — 2013-12-30T13:21:50-05:00 — #4
Thank you for your reply!
If I understand correctly, that the expansion of pages Registration, enter personal Cabinet and a Basket of buyers do not need to change the HTML? And tell me , please, what is your opinion of Notepad++.
Thanks in advance.
lorenw — 2014-01-01T12:27:18-05:00 — #5
I use Notepad++ and it is great, lots of useful plugins also.
hall_of_famer — 2014-01-01T12:54:14-05:00 — #6
One advantage of using Notepad++ is that its fast to launch and easy to use, I normally use it when I only wish to modify one or a few lines of code. If I need to write one or several class files Id actually use Netbeans instead.
daria_alexeeva — 2014-01-01T15:34:16-05:00 — #7
Thank you all for your explanations about Notepad++!
But I have a huge request, please explain to me: " you have to change the extension of the files in the web pages: Registration, entering my account and shopping cart with php to html, because I will these names to these pages : Registration, enter personal Cabinet and a Basket of the buyer to write the php file, which will handle.
Thanks in advance.
mittineague — 2014-01-01T17:22:34-05:00 — #8
If you have Apache and access to the httpd.conf file you can have the PHP engine process any file extension type.
AddType application/x-httpd-php .php .phar .htm .html
hall_of_famer — 2014-01-02T07:12:06-05:00 — #9
If you have windows operating system, I believe its quite easy to change file extension. Simple open it in notepad++, try the menu option 'save as' and set the file type to All, then just save your file as file.php or file.html for whatever format you will be using. I always play this trick when I need to change the extension of my template files from .html to .tpl.
daria_alexeeva — 2014-01-02T11:23:57-05:00 — #10
Thank you all for your help!