PHP within HTML

This is a discussion on "PHP within HTML" within the PHP Forum section. This forum, and the thread "PHP within HTML are both part of the Program Your Website category.



Go Back   Webforumz.com > Main Forums > Program Your Website > PHP Forum

Notices


Reply
 
LinkBack Thread Tools
  #1 (permalink)  
Old Dec 6th, 2005, 19:05
New Member
Join Date: Dec 2005
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
PHP within HTML

Hello everyone, and welcome to my first post on a www.webforumz.com forum.

Problem;

I need to dynamically integrate the output of a php script (i.e. the php file) into an
html document without using anything as crude as <IFRAME>

NB: the php script converts RSS to HTML.

My ISP provides a separate cgi sever and web server i.e. there is no relative path between the two.

Solution;

1. Use SSI to #INCLUDE (virtual or otherwise) the php script

Problem; SSI can only handle relative paths and the php script needs to run on the cgi server to work (this also rules out #EXEC SCRIPT).

NB: the php script (when executed directly in the cgi directory) /cgi-bin/rss2html.php runs fine by itself (i.e. there is no problem with the script code)

2. Use php <? Include?> in my html to include the full url of the php script.

Problem; Use of a php <? include ?>, or indeed any other embedded php code, requires that the file be saved as .php Therefore my web page will need to run on the cgi server. Effectively, this recreates the original problem. Besides, I don't want to end up putting my entire web site on the cgi server.

3. Use a small html file on the cgi server "just" to #INCLUDE the php script (effectively converting PHP output to an HTML file)

Problem; same as both problem (1) and problem (2). Relative paths, etc. (don't forget, I need to keep my website files on the web server)

4. Use <SCRIPT> tags to include the php script.

Problem; (1) language "pgp", just get a blank output (2) language "javascript", same again. Although I believe some sort of javascript interpretation may need to be written into the original php script?

NB: I have found website that shows how to use javascript to create a "clientsideinclude" (http://www.boutell.com/newfaq/creating/include.html).

However, to be honest, I don't want to use javascript because of security issues (i.e. browsers of my site having javascript disabled by default)

I am very new to cgi scripting, and would appreciate any help.

Best regards to you all, John.
Reply With Quote

Reply

Tags
php, within, html

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
HTML, css and php gecko Web Page Design 4 Apr 17th, 2008 07:44
Help with my html totally new Web Page Design 12 May 30th, 2007 20:39
Can I do this with html or anything else??? Petey_ Web Page Design 2 May 31st, 2006 21:04
Html leonheart Introduce Yourself 3 Aug 19th, 2005 21:55


All times are GMT. The time now is 21:07.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC8
© 2003-2008 Webforumz.com : All Rights Reserved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43