Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Calling Compiled SSI 1

Status
Not open for further replies.

webmigit

Programmer
Aug 3, 2001
2,027
US
Hi guys, problem.. as you'll see the code below... it works fine but I want it to call the file 'compiled'... if i go to the file, it compiles the ssi and includes it all... if I call it with the php script it doesn't do anything but calls it as a plain text file...

Anything I can do? Another function I can use?

Thanks,
Tony Hicks
Code:
<?php

$to = &quot;thicks@wisernet.com\r\n&quot;;
$subject = &quot;Testing&quot;;
$fn = &quot;/path/to/public_html/testingnewalert.htm&quot;;
$fp = fopen(&quot;$fn&quot;, &quot;r&quot;);
$fc = fread($fp, filesize($fn));
mail(&quot;aim@me.com&quot;, &quot;$subject&quot;, &quot;$fc&quot;, &quot;From: Test <aim@me.com>&quot;);
?>
 

The code:

Code:
<?php
$to = &quot;thicks@wisernet.com\r\n&quot;;
$subject = &quot;Testing&quot;;
$fn = &quot;[URL unfurl="true"]http://www.sierratimes.com/testingnewalert.htm&quot;;[/URL]
$fp = fopen(&quot;[URL unfurl="true"]http://www.sierratimes.com/testingnewalert.htm&quot;,[/URL] &quot;r&quot;);
$fc = fread($fp, filesize($fn));
mail(&quot;thicks@wisernet.com&quot;, &quot;$subject&quot;, &quot;$fc&quot;, &quot;From: Test <aim@me.com>&quot;);
?>
returns an error... but I can call it by the path...
 
You can't do filesize() on a URL &quot;wrapped&quot; filehandle. ______________________________________________________________________
TANSTAAFL!
 
Why you don't replace the fopen,fread and fclose by only one command?

$fc=implode(&quot;&quot;,file(&quot;
this function opens the http address and put it's output in an array where each line is in one line of the array.

With the implode, you put everyline of the array in one text var.

Doing this command, you will get in the $fc var the result of the file calling.

Anikin
Hugo Alexandre Dias
Web-Programmer
anikin_jedi@hotmail.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top