2

Iam trying to find the setting, where i can have PHP execute other file extensions into the PHP Engine?

Any idea?

1

3 Answers 3

5

exec() will execute an external program, if that's what you mean. You can capture the output, but I'm not sure if that's what you mean by "into the PHP engine."

http://php.net/manual/en/function.exec.php

Edit: If you mean running other file extensions as PHP, you can edit .htaccess to specify the file type. For example, to run .html as PHP:

AddType application/x-httpd-php .html
Sign up to request clarification or add additional context in comments.

Comments

2

This would have to do with how your server handles requests. The server if probably configured to pass requests with the .php extension to php. You could modify your server configuration to pass other requests to the php parser as well.

Since I don't know what type of server you're using, I can't say how to modify the config.

Comments

-1

You can execute other files using the include function. This will parse any file with the php tags into php!

**NOTE - Including files from the webroot that are non-php means that people can gain access to the script in question, without it being executed. I highly Recommend that you don't do this in most situations.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.