I have the same version of php running on our linux server as I have
on my local xampp runing under windows. While working yesterday a
piece of code I wrote just wouldn't work on the server, but ran fine
under xampp. The code in question opened a file and reads in the
contents line by line using a construct similar to this:
if ($line != "")
{
$xmlString .= "<setup value\"$line\" />\n";
}
After about 15 minutes of trying to figure out why it wasn't working
(the servers php error was mixed in the xml output and truncated) I
learned that on the server I had to have a line:
$xmlString = "";
before the routine, yet on the xampp one I didn't need it. So I am
wondering, what option is either enabled or disabled to cause me to
have to declare the variable before using it?
Bill H
on my local xampp runing under windows. While working yesterday a
piece of code I wrote just wouldn't work on the server, but ran fine
under xampp. The code in question opened a file and reads in the
contents line by line using a construct similar to this:
if ($line != "")
{
$xmlString .= "<setup value\"$line\" />\n";
}
After about 15 minutes of trying to figure out why it wasn't working
(the servers php error was mixed in the xml output and truncated) I
learned that on the server I had to have a line:
$xmlString = "";
before the routine, yet on the xampp one I didn't need it. So I am
wondering, what option is either enabled or disabled to cause me to
have to declare the variable before using it?
Bill H
Comment