Tom Rogers wrote:
Hi,

Saturday, July 19, 2003, 10:31:04 AM, you wrote:
DW> Folks,

DW> I've searched through the archives of the general mailing list and DW> cannot find the answer to my question. My web hosting service requires DW> ALL scripts run from /cgi. I've tried putting <?php ?> and <SCRIPT language=php SCRIPT>> in my HTML files (located in /web/???) to run php DW> commands but they aren't working. The web hosting "tech support" can DW> only tell me that all php scripts must be located in /cgi; NO php code DW> allowed in /web directory. So, how can I load an html file from /web, DW> but within that file run a php script from /cgi?

DW> Thanks, and I'm sorry if this IS available in the archives.

DW> Dale

Time to find another 'serious' hosting company :-)

you may need to put this in the cgi file (if you are on a unix server)

#!/usr/bin/php
<?
include('/path_to_web/page.html');
.
.
?>

change /usr/bin to whatever directory the cgi version of php is in if
you can find out where they have hidden it.


Thanks for the response Tom. Unfortunately, that won't work either. A little background.... I'm using Dreamweaver and their template feature. for the site. I want to read some info out of a text file and format it into the web page. (the hosting company doesn't support any db either... I wish I COULD change companies, but...) So, if I use your idea, when the html file is included in my php script in /cgi, the images in the html file will be relative, not absolute (../images/***).


The only solution I can think of is to call the php script, have it extract the info I need and deposit it (with html-formatting) into a file, then have the html file include that file. Course, this will blow up if more than one person accesses the site at the same time.

Anybody with any other thoughts?

Thanks
Dale


-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php



Reply via email to