logo
Apache Lounge
Webmasters

 

About Forum Index Downloads Search Register Log in RSS X


Keep Server Online

If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.

or

Bitcoin

A donation makes a contribution towards the costs, the time and effort that's going in this site and building.

Thank You! Steffen

Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
Post new topic   Forum Index -> Other Software View previous topic :: View next topic
Reply to topic   Topic: php issue on shared host
Author
tk



Joined: 27 Jun 2006
Posts: 10

PostPosted: Sat 16 Sep '06 23:30    Post subject: php issue on shared host Reply with quote

I'm having a bit of an issue here. I am working on a site that is on a shared server through a hosting company, so the only access I have to apache itself would be via .htaccess. The issue is that while php scripts do run in .php files, if I try to include php in my html....

<html>
html code for the page
<?php php code ?>
more html code
</html>

it doesn't parse the php at all. In fact, it treats the entire things as text and outputs <?php php code?> literally to the browser. The questions are, I guess, why is this happening and how can I fix it in .htaccess?
Back to top
Jorge



Joined: 12 Mar 2006
Posts: 376
Location: Belgium

PostPosted: Sun 17 Sep '06 0:11    Post subject: Reply with quote

php should only be used i nfiles ending in .php.

Just use index.php instead of index.html and you should be fine.
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 7298
Location: Germany, Next to Hamburg

PostPosted: Sun 17 Sep '06 14:06    Post subject: Reply with quote

You can set in .htaccess
php_admin_value auto_prependfile youfile.php


auto_prepend_file
see http://de2.php.net/manual/en/ini.core.php
Back to top


Reply to topic   Topic: php issue on shared host View previous topic :: View next topic
Post new topic   Forum Index -> Other Software