[HTML / PHP]: Ben uzantısını değiştirmek gerekir mi HTML dosyası.

3 Cevap php

Ben bunun içine bir tablo ile basit bir. Html dosyası oluşturursanız. Ben PHP açılış ve kapanış etiketleri eklemek, ve hatta sadece yankı yazarsanız bir tablo sütunlardan birinin içinde, o çalışmıyor. Ben. Php için dosya uzantısını değiştirmek gerekir mi?

3 Cevap

. Php dosyayı değiştirme hızlı bir çözüm olacaktır.

Bir alternatif çözüm apache farklı bir uzantıya sahip PHP sayfaları hizmet sağlamak için Apache'nin addType kullanmak olacaktır.

AddType application/x-httpd-php .html .htm

Evet, çoğu durumda.

The webserver needs to know it has to process the file through the php processor, instead of just giving it to the user as is the default for a .html file. So renaming to .php is the easiest way to get that.

Eğer AddType kullanırsanız, daha sonra all html dosyaları çok fazla şeyler yavaşlatmak olabilir, php işlemci geçiyor.