เอามาฝากแทรกโค้ด php ในไฟล์นามสกุล html

เริ่มโดย nakhonitech, 07 พฤศจิกายน 2016, 19:20:10

หัวข้อก่อนหน้า - หัวข้อถัดไป

0 สมาชิก และ 1 ผู้มาเยือน กำลังดูหัวข้อนี้

nakhonitech

How to perform PHP code in the .html file?

ทำได้โดย .htaccess สำหรับ โฮสติ้ง directadmin


หมายเหตุ
: สำหรับท่านที่ ไม่อยากเปลี่ยน ไฟล์นามสกุล html ไปเป็น php โดยตรง เพราะกลัวเสีย seo

php works in mod_php mode

<IfModule dir_module>
    Addhandler application/x-httpd-php .php .htm .html .wml
</IfModule>


แบบ  php works in FastCGI mode

<FilesMatch "\.(html|htm)$">
AddHandler fcgid-script .php .html
FCGIWrapper "/usr/local/safe-bin/fcgid53.sh" .htm
FCGIWrapper "/usr/local/safe-bin/fcgid53.sh" .html
</FilesMatch>


It does not work. The code is not executed. Files in the folder /usr/local/safe-bin/fcgid53.sh there.

หรือ
php5.3 FastCGI mode

<FilesMatch "\.(html|htm|php)$">
AddHandler fcgid-script .php .htm .html
FCGIWrapper "/usr/local/safe-bin/fcgid53.sh"
</FilesMatch>


php5.6 FastCGI mode

<FilesMatch "\.(html|htm|php)$">
AddHandler fcgid-script .php .htm .html
FCGIWrapper "/usr/local/safe-bin/fcgid56.sh"
</FilesMatch>



www.nakhonitech.com


kondam

ขอแนะนำ : :wanwan034:

1. จดโดเมน ต่ออายุ godaddy ลด 40% ถูกที่สุดในตอนนี้! [direct=http://bit.ly/2HhtxzY]คลิก[/direct]

2.จดโดเมน + private 8.88$ [namecheap]   [direct=http://bit.ly/2kuZoG4]คลิก[/direct]

3.แนะนำคลาวด์โฮสติ้งไทย ที่ผมใช้อยู่ [Thaidata]   [direct=https://goo.gl/Jvpgzs]คลิก[/direct]

BOYWINDOWN88

[direct=http://www.thanawanphabai.co.th] เต็นท์ผ้าใบ
[/direct]
[direct=http://www.thanawanphabai.co.th] จัดงานเลี้ยง
[/direct]
[direct=http://www.thanawanphabai.co.th] เต็นท์ให้เช่า
[/direct]

Nasir

หลงรักเพชรบุรี
https://longrakphetchaburi.com

arthit24


userhuman

[direct=https://meframephoto.com]รับอัดรูปออนไลน์ ขยายรูป ทำภาพเก่าให้ใหม่ ใส่กรอบรูป[/direct]

[direct=https://medium.com/@nicksq]อ่านเขียนโปรแกรมยังไงให้เทพ[/direct]

[direct=https://www.youtube.com/channel/UC1ZQ_Sxmrlv4dxIhB3LUwPA]สอนเขียนโปรแกรม และเทคนิคฟรี กด Subscribe & กระดิ่งไว้นะ[/direct]

sinomoney

[direct=http://www.thaiseoboard.com/index.php/topic,438918.0.html]โปรแกรมโพสเว็บบอร์ด[/direct] ระบบโพสบน Server ไม่ต้องติดตั้ง ทดลองฟรี
[direct=https://backlink-seo.com]โปรแกรมทำ Backlink[/direct] CommentBlog ใช้งานบนเว็บ ทดลองฟรี

koing01

[direct=http://www.tkalcohol.com]เครื่องเป่าแอลกอฮอล์[/direct] [direct=http://www.tkbike.com]จักรยาน[/direct]
[direct=http://www.muscleh.com]บาร์โหน[/direct]

markhacd

หากคุณกำลังมองหา[direct=http://www.xn--12c2ca0dl7dte2c.com]เครื่องสแกนลายนิ้วมือ[/direct] / [direct=http://www.xn--12c2ca0dl7dte2c.com/products_list_type.php?tid=2]เครื่องสแกนใบหน้า[/direct] / [direct=http://www.xn--12c2ca0dl7dte2c.com/index.php]สแกนนิ้ว[/direct] / [direct=http://www.xn--12c2ca0dl7dte2c.com/products_list_type.php?tid=1]สแกนนิ้วมือ[/direct] แนะนำบริษัทที่จำหน่ายสินค้าคุณภาพที่ [direct=http://www.xn--12c2ca0dl7dte2c.com]www.สแกนนิ้ว.com[/direct]

memo4219

หมายถึง จะทำเว็บเป็น .html เหร้อครับ คือ งง หน่อยครับ

อ่านแล้วเหมือน ในแง่ SEO ไฟล์ .html จะดีกว่า .php หรือครับ

ผมเพิ่งรู้นะนี่ นึกว่ามันก็เหมือนๆ กันซะอีก