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.
|
|
|
|
|
![]() |
||
PHP within HTML
|
||
| Notices |
![]() |
|
|
LinkBack | Thread Tools |
|
|||
|
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. |
|
|
![]() |
| Tags |
| php, within, html |
| Thread Tools | |
|
|
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 |