 |

01-29-2008, 10:16 AM
|
|
WebProWorld 1,000+ Club
|
|
Join Date: Jul 2003
Location: United Kingdom
Posts: 1,679
|
|
cURL, embed PHP into HTML
Embeded PHP in HTML refuses to display. A direct PHP call functions.
HTML with Embeded PHP does not display
A direct PHP call functions
I've tried various .htaccess, using AddType application/x-httpd-php .htm .html at this time
and various httpd.conf, this is blank for PHP at this time.
My new host say it is using cURL because of security, (Is it this is causing problems).
So how, easy way please, I get PHP to display embeded withing HTML pages?
Any help, gratefully received 
|

01-30-2008, 08:10 AM
|
 |
WebProWorld Veteran
|
|
Join Date: Dec 2006
Location: Calgary, Alberta, Canada
Posts: 328
|
|
Re: cURL, embed PHP into HTML
You have to rename the page to use the .php extension. It doesn't matter if the content is mostly (or even all) HTML.
So rename your test_php.html to test_php.php and it'll work just fine.
|

01-30-2008, 08:21 AM
|
|
WebProWorld 1,000+ Club
|
|
Join Date: Jul 2003
Location: United Kingdom
Posts: 1,679
|
|
Re: cURL, embed PHP into HTML
The issue I want .html (with PHP in them)
I just think this is more user, (and maybe search engine), frendly
Thany You 
|

01-30-2008, 09:59 AM
|
 |
Moderator
|
|
Join Date: Jun 2006
Location: United States
Posts: 1,629
|
|
Re: cURL, embed PHP into HTML
Because of cURL, I think you need to use AddHandler, instead of just AddType. AddType changes the MIME type of the document, and the server should process the document according to that new MIME type. Because the MIME type does change, this is not the issue. The issue is that the server doesn't know what to do with a document of type application/x-httpd-php, so it simply serves the document to the client. AddHandler creates a specific link between the file extension and the script handler. I would still recommend trying the following:
AddHandler php5-script .html
|

01-30-2008, 10:50 AM
|
|
WebProWorld 1,000+ Club
|
|
Join Date: Jul 2003
Location: United Kingdom
Posts: 1,679
|
|
Re: cURL, embed PHP into HTML
I've triesd a few AddHandler ... but no joy. I'm looking for a different host, (yet again)
Have tried:-
AddHandler x-httpd-php .html .htm
AddHandler php5-script .html
Thank you
|

01-30-2008, 03:36 PM
|
 |
WebProWorld Veteran
|
|
Join Date: Dec 2006
Location: Calgary, Alberta, Canada
Posts: 328
|
|
Re: cURL, embed PHP into HTML
Quote:
Originally Posted by TrafficProducer
I just think this is more user, (and maybe search engine), frendly 
|
Really? Why?
|

02-04-2008, 10:21 PM
|
|
WebProWorld Veteran
|
|
Join Date: Jul 2003
Location: Bristol, UK
Posts: 965
|
|
Re: cURL, embed PHP into HTML
The extension of your web page makes no difference to neither your users nor search engines. If the php scripts you are trying to include are on your site then I recommend using include or require over cURL as they put less demand on the resources and are faster.
|

02-05-2008, 06:18 AM
|
|
WebProWorld 1,000+ Club
|
|
Join Date: Jul 2003
Location: United Kingdom
Posts: 1,679
|
|
Re: cURL, embed PHP into HTML
I've moved to a better host, without these issues.
Thanks everyone 
|
| Thread Tools |
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|