Jump to content
php.lv forumi

probleema


Recommended Posts

Hmm..Iemaucu šo kodu no php.net:

 

<?php
$file = fopen ("http://localhost/index.php", "r");
if (!$file) {
  echo "<p>Unable to open remote file.\n";
  exit;
}
while (!feof ($file)) {
  $line = fgets ($file, 1024);
  /* This only works if the title and its tags are on one line */
  if (eregi ("<title>(.*)</title>", $line, $out)) {
   $title = $out[1];
   break;
  }
}
fclose($file);
?>

 

allow_url_fopen = On

 

Kā palaižu skriptu tā Windows izmet :PHP Script Interpreter has encountered a problem and needs to close. We are sorry for the inconvenience.

 

Error_log failā ir: Premature end of script headers: c:/php/php.exe.

 

Kas par bumbām? Netieku pat tiktāl ka būtu "Unable To Open Remote File". Itkā viss ir pareizi

Link to comment
Share on other sites

×
×
  • Create New...