Technical Help & Discussion > Website Design & Programming

PHP in HTML

(1/2) > >>

DJ:
Hi All,

I host a website in Force9's servers, I've got a php script (that produces a calander) on my cgi server and the main web pages on another normal 'homepages' server.

How do I embed the php script into the HTML page.

I tried the following in the HTML file,


--- Code: ---<script language="php" src=http://cgi.blahblahblah.force9.co.uk/php/cal.php></script>
--- End code ---


but it didn't work.

Any Ideas?

Cheers :thumb:

DJ

princeofdarkness:

--- Quote from: DJ on April 24, 2004, 20:23 ---
Hi All,

I host a website in Force9's servers, I've got a php script (that produces a calander) on my cgi server and the main web pages on another normal 'homepages' server.

How do I embed the php script into the HTML page.

I tried the following in the HTML file,


--- Code: ---<script language="php" src=http://cgi.blahblahblah.force9.co.uk/php/cal.php></script>
--- End code ---


but it didn't work.

Any Ideas?

Cheers :thumb:

DJ

--- End quote ---









--- Code: ---<script language="php"> src=http://cgi.blahblahblah.force9.co.uk/php/cal.php></script>
--- End code ---



try that

DJ:
Thanks Jonah, I tried


--- Code: ---<script language="php"> src=http://cgi.blahblahblah.force9.co.uk/php/cal.php</script>
--- End code ---


and


--- Code: ---<script language="php"> src="http://cgi.blahblahblah.force9.co.uk/php/cal.php"</script>
--- End code ---


None worked. Should it have done  ???  Can you actially embed php direct in html?

DJ

Adept:
Try


--- Code: ---<? include 'http://cgi.blahblahblah.force9.co.uk/php/cal.php'; >
--- End code ---






The
--- Code: ---<?
--- End code ---


and
--- Code: --->
--- End code ---
are the correct begin and end markers for PHP code in HTML

the
--- Code: ---include 'http://cgi.blahblahblah.force9.co.uk/php/cal.php';
--- End code ---


tells PHP to load that file and interpret it as PHP code.

HTH

DJ:
Nope it didn't work either Adept.

I have sent a request to Force9 to see what they say. The problem I think is that the cgi server is separate to the HTML server and so linking the two is quite difficult.

For the time being I have used


--- Code: ---<br />&lt;iframe src=&quot;http://cgi.blahblahblah.force9.co.uk/php/cal.php&quot;<br />&gt;&lt;/iframe&gt;&lt;/center&gt;<br />
--- End code ---


Which works fine.

DJ

Navigation

[0] Message Index

[#] Next page

Go to full version