Page 1 of 1

posting php on htm page

Posted: Mon Nov 30, 2009 12:00 pm
by gordons
Hi everyone

I'm new to both php and to this forum and would appreciate your help

I'm trying to post a php code to a htm page and thought all I had to do was add

AddType application/x-httpd-php .htm

to my .htaccess then add the php code to the source code on my htm page

Alas this did not work, I got the following error message


Warning: include() [function.include]: URL file-access is disabled in the server configuration in /home/gotgo/public_html/index2.htm on line 36

Warning: include(http://si.goldencan.com/GetData.aspx?ve ... 5.30729%29) [function.include]: failed to open stream: no suitable wrapper could be found in /home/gotgo/public_html/index2.htm on line 36

Warning: include() [function.include]: Failed opening 'http://si.goldencan.com/GetData.aspx?ve ... 5.30729%29' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/gotgo/public_html/index2.htm on line 36

I'm afraid I'm totally baffled, can anyone please help

Many thanks in anticipation

Re: posting php on htm page

Posted: Mon Nov 30, 2009 12:11 pm
by AbraCadaver
Change in php.ini:

allow_url_include Off

to:

allow_url_include On

Re: posting php on htm page

Posted: Mon Nov 30, 2009 12:35 pm
by gordons
Wow, thanks AbraCadaver for a very speedy reply

Could I ask for a bit more help

Where do I find the php.ini so I can alter it?

Re: posting php on htm page

Posted: Mon Nov 30, 2009 6:00 pm
by Weiry
Well assuming your server is localhost currently.
<WEB SERVER DIRECTORY>\bin\php\phpX.X.X\

If your running on an online server, then you might have to use
ini_set() because an online service usually wont allow you access to their php.ini