Linux+nginx using if to determine the problem

Source: Internet
Author: User
Recently encountered a problem: my local Operation project environment is Wamp, and then uploaded to the service space is Linux+nginx. When running locally and running in the WAMP environment, the following feature is absolutely no problem,
But there was a situation in Linux+nginx:
The code that implements the function is the same, and this part of the code is as follows:
$properties _gj = get_goods_properties_gj ($goods _id); Get specifications and attributes for advanced custom products
Var_dump ($properties _gj);
$spe = Array ();
foreach ($properties _gj[' spe '] as $v) {
if ($v [' name '] = = ' plus word ') {
$spe [0] = $v;
}
if ($v [' name '] = = ' appearance material ') {
$spe [1] = $v;
}
if ($v [' name '] = = ' inside material ') {
$spe [2] = $v;
}
}
echo "
";
Var_dump ($spe); exit;
Additional: Print the results of $PROPERTIES_GJ
Array (3) {
["Pro"]=>
Array (0) {
}
["SPE"]=>
Array (3) {
[2]=>
Array (3) {
["Attr_type"]=>
String (1) "1"
["Name"]=>
String (6) "Add word"
["Values"]=>
Array (1) {
[0]=>
Array (6) {
["Label"]=>
String (12) "Engraved text"
["Price"]=>
String (3) "200"
["IMGs"]=>
String ("./images/attr/c249e9ab5fb4df62753e3ce483ca2296.png")
["Times"]=>
String (1) "5"
["Format_price"]=>
String (9) "¥200.00"
["id"]=>
String (3) "265"
}
}
}
[3]=>
Array (3) {
["Attr_type"]=>
String (1) "1"
["Name"]=>
String (12) "appearance material"
["Values"]=>
Array (1) {
[0]=>
Array (6) {
["Label"]=>
String (21) "Customizable to any wood grain"
["Price"]=>
String (3) "500"
["IMGs"]=>
String ("./images/attr/8d0a35a4d338ae4acdfbe650d84026bc.png")
["Times"]=>
String (2) "15"
["Format_price"]=>
String (9) "¥500.00"
["id"]=>
String (3) "266"
}
}
}
[4]=>
Array (3) {
["Attr_type"]=>
String (1) "1"
["Name"]=>
String (12) "Inside material"
["Values"]=>
Array (1) {
[0]=>
Array (6) {
["Label"]=>
String (18) "This paragraph is not replaceable"
["Price"]=>
String (0) ""
["IMGs"]=>
String (0) ""
["Times"]=>
String (1) "0"
["Format_price"]=>
String (7) "¥0.00"
["id"]=>
String (3) "267"
}
}
}
}
["LNK"]=>
Array (0) {
}
}

In the WAMP environment to print $spe is a value, but in Linux+nginx, print out is empty, how also can not enter if judgment, if the If judgment is removed $spe [0] = $v; $spe [1] = $v; $spe [2] = $v; (or the "=" in the If condition) = "Change to" = "), only get to the situation. On the Linux+nginx, will not be configured, if not configured, there is no solution to the method, thank you for pointing!


Reply to discussion (solution)

You print $properties_gj and $goods_id and see

  • Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.