HELP UNIX vs Windows
| From: | Christopher J. Crane | Date: | Thu, 07 Mar 2002 02:25:31 +0000 |
| Subject: | HELP UNIX vs Windows | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-87562@lists.php.net to get a copy of this message | ||
I am a PERL scripter and I am just getting into PHP. My first few pages are
simple but I am running into a few problems when changing OS. I included
below a piece of code that works fine in windows but not on a linux box. Not
sure what the differences would be....
The problem is that on the windows platform all information is returned. On
the linux platform the "$Details" variable is not populated. The nothing
changes...so what could it be. The only thing I can think of is that maybe
the version of php is different on the linux server.
Here is the code.....after reading in a file with "|" deliminations
while ($i < $length):
$tok = strtok($cartFile[$i],"|");
$Category = $tok; $tok = strtok("|");
$SKU = $tok; $tok = strtok("|");
$Name = $tok; $tok = strtok("|");
$SubCategory = $tok; $tok = strtok("|");
$Price = $tok; $tok = strtok("|");
$Image1 = $tok; $tok = strtok("|");
$Image2 = $tok; $tok = strtok("|");
$OnSale = $tok; $tok = strtok("|");
$SalePrice = $tok; $tok = strtok("|");
$Details = $tok; $tok = strtok("|");
if($MCat == "$Category") {
$Count++;
if($OnSale == "1") { $Price = "<s>$$Price</s> <font
color=\"red\">On
Sale Now!</font> $$SalePrice"; }
displayProd($Category,$SKU,$Name,$SubCategory,$Price,$Image1,$Image2,$OnSale
,$SalePrice,$Details);
}
$i++;
endwhile;