Problems including php in html

software development


I have several Dreamhost domains - and php works on all of them, so I shouldn’t have to do anything to .htaccess. The following works in an shtml file:

-which includes output of a php page on the same domain.

However, I want to be able to include that same output in an html file on another domain (under a different user account). None of the following work. Help?

<?php $fileOutput=implode('',file('')); ?> <?php readfile(""); ?> <?php include(""); ?> <?php $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, ""); curl_setopt($ch, CURLOPT_HEADER, 0); curl_exec($ch); curl_close($ch); ?>


This helps?

[color=#00CC00]ANONYMOUS0=>Max Discount[/color] [color=#6600CC]ANONYMOUS2=>Max - $1.[/color] Being mean doesn’t make you look smarter than him. And bigoted remarks are not appreciated on this forum.


DreamHost disabled allow_url_fopen in their install of PHP. This means you can not use URLs instead of path names.

See the DreamHost Wiki article on CURL for examples of doing different things. The code you posted does what it says - fetches the content. You’ll need to do something with it once you have it, like save it to a file or output it to the browser.

:cool: -//- One-time [color=#6600CC]$50.00 discount[/color] on [color=#0000CC]DreamHost[/color] plans: Use ATROPOS7


This may seem like I’m stating the blindingly obvious, but why not just copy the relevant files to the alternate user account so that you can use a regular include() function?

si-blog | Keystone Websites
Save $97 on yearly plans with promo code [color=#CC0000]SCJESSEY97[/color]