Hi, Guys:
Here is a strange scenario that I am attempting to do. I am trying to
extract some information from an external source on a different server, and
then include some of the external calculations as I am running scripts on a
local machine.
Below is my script snippet:
// Get a file into an array. In this example we'll go through HTTP to get
// the HTML source of a URL.
$lines2 = file("http://www.mysite.com/lung.txt");
$file2="http://www.mysite.com/lung.txt";
echo "<h2>This is the file for <b>$file2:</b></h2>";
// Loop through our array, show HTML source as HTML source; and line numbers
too.
foreach ($lines2 as $line_num => $line2) {
echo "<p>Line #<b>{$line_num}</b> : " . htmlspecialchars($line2) . "</p>";
}
include ('http://www.mysite.com/calculate.php');
My problem is that when I use a blank file that only has
<?php include 'http://www.mysite.com/calculate.php'; ?>
The code works and displays what is meant to display. However, when I copy this
snippet into the code even outside the foreach loop, it does not even read, or
give me an error. Is there something I should not be doing here?
I welcome any suggestions.
Alice
======================================================
Alice Wei
MIS 2009
School of Library and Information Science
Indiana University Bloomington
[EMAIL PROTECTED]
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php