Jump to content

PHP shebang vs .htaccess


miless

Recommended Posts

A while back my webhost changed something and the ADDTYPE and FORCETYPE lines of my .htaccess did not work anymore: All my PHP pages were not executed and anybody accessing my site could read my PHP scripts.

 

In order for this to never happen again I would like a best-practice or fool-proof way of executing my PHP scripts on my website.

 

- Adding the shebang line and making my scripts world executable will solve this?

- Which method will theoretically execute the scripts faster? The ADDTYPE and FORCETYPE lines or the shebang method?

- Can I have both methods at the same time?

 

#!/usr/bin/php5

 

Any expertise on the subject?

Link to comment
https://forums.phpfreaks.com/topic/149977-php-shebang-vs-htaccess/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.