Im getting this error on an old php file im trying to migrate across to a new server...
http://www.pixelsquaredesigns.com/words/
Any of the programmer types on here know whats causing it?
Here is the code...
Code:
<?php
// Text file containing words
$txt = '/home/orange/public_html/pixelsquaredesigns.com/words/list.txt';
$handle = fopen($txt, 'r');
if (!$handle) {
die('Could not open...');
}
// set up arrays for storing words and concatenated words
$words = array();
$cwords = array();
// get the words
while (!feof($handle)) {
// strip_newlines is not a real function - needs to be implemented
array_push($words, strip_newlines(fgets($handle)));
}
// while we still have words
for ($i = 0; $i < count($words); $i++) {
// get the current word
$curword = $words[$i];
// loop over the words
foreach ($words as $word) {
// if the word is the same as the current word, skip it - i.e. no CatCat
if ($word == $curword) {
continue;
}
// append the concatenated word to the array
array_push($cwords, $curword.$word);
}
}
foreach ($words as $var) echo $var."<br>";
foreach ($cwords as $var2) echo $var2."<br>";
?>
Thanks in advance for any assistance you can offer
