首頁 >後端開發 >php教程 >php的字符串无法被打印输出是怎么回事?

php的字符串无法被打印输出是怎么回事?

WBOY
WBOY原創
2016-06-06 20:37:491605瀏覽

<code>$sql = 'select c.config_key as ck,c.config_value as cv,cg.config_group_key as cgk from '.
       zen_get_table_name('config').' c, '.zen_get_table_name('config_group').' cg where c.config_group_id=
       cg.config_group_id order by cg.config_sort_order,c.config_sort_order';

$config = $zen_db->Execute($sql);

$zen_str = '<?php if(!defined(ZEN_ADMIN)){die(\'illegal access\');}'."\n";
while(!$config->end)
{
    $zen_str .= '$conf[\''.$config->field['cgk'].'\'][\''.$config->field['ck'].'\'] = \''.$config -> field['cv']."';\n";

    $config->move_next();
}
file_put_contents($conf['path']['config'].'/config.php',$zen_str);
var_dump($zen_str);
</code>

就是从数据库取出的三个字段的多行的值组成的数组的字符串不知道为什么使用var_dump()这样的函数无法打印出字符串呢?
下面是写入一个文件中的内容:

<code><?php if(!defined(ZEN_ADMIN)){die('illegal access');}
$conf['general']['store_name'] = 'my store';
$conf['general']['store_owner'] = 'store ownner';
$conf['general']['store_telephone_custservice'] = '';
$conf['general']['store_country'] = '44';
$conf['general']['store_zone'] = '131';
$conf['general']['store_name_address'] = '商店名称
 地址
 国家
 电话';
$conf['general']['expected_products_sort'] = 'desc';
$conf['general']['expected_products_field'] = 'date_expected';
$conf['general']['use_default_language_currency'] = 'true';
$conf['general']['language_default_selector'] = 'Default';
$conf['general']['display_cart'] = 'true';
$conf['general']['advanced_search_default_operator'] = 'and';
$conf['general']['show_counts'] = 'false';
$conf['general']['show_counts_admin'] = 'true';
$conf['general']['tax_decimal_places'] = '0';
$conf['general']['display_price_with_tax'] = 'false';
$conf['general']['display_price_with_tax_admin'] = 'false';
$conf['general']['store_product_tax_basis'] = 'Shipping';
$conf['general']['store_shipping_tax_basis'] = 'Shipping';
$conf['general']['store_tax_display_status'] = '0';
$conf['general']['show_split_tax_checkout'] = 'false';
$conf['general']['store_status'] = '0';
$conf['general']['session_timeout_admin'] = '900000';
$conf['general']['global_set_time_limit'] = '60';
$conf['general']['show_version_update_in_header'] = 'true';
$conf['general']['display_server_uptime'] = 'true';
$conf['general']['missing_page_check'] = 'Page Not Found';
$conf['general']['currency_uplift_ratio'] = '1.05';
$conf['general']['html_editor_preference'] = 'NONE';
$conf['general']['phpbb_links_enabled'] = 'false';
$conf['min']['entry_first_name_min_length'] = '1';
$conf['min']['entry_nick_min_length'] = '1';
$conf['min']['entry_last_name_min_length'] = '1';
$conf['min']['entry_dob_min_length'] = '10';
$conf['min']['entry_email_address_min_length'] = '6';
$conf['min']['entry_street_address_min_length'] = '4';
$conf['min']['entry_company_min_length'] = '0';
$conf['min']['entry_postcode_min_length'] = '4';
$conf['min']['entry_city_min_length'] = '2';
$conf['min']['entry_state_min_length'] = '2';
$conf['min']['entry_telephone_min_length'] = '6';
$conf['min']['entry_password_min_length'] = '7';
$conf['min']['cc_owner_min_length'] = '2';
$conf['min']['cc_number_min_length'] = '10';
$conf['min']['cc_cvv_min_length'] = '3';
$conf['min']['review_text_min_length'] = '1';
$conf['min']['min_display_bestsellers'] = '1';
$conf['min']['min_display_also_purchased'] = '1';
$conf['max']['max_address_book_entries'] = '5';
$conf['max']['max_display_search_results'] = '20';
$conf['max']['max_display_page_links'] = '5';
$conf['max']['max_display_new_products'] = '9';
$conf['max']['max_display_search_results_featured'] = '9';
$conf['max']['max_display_special_products_index'] = '10';
$conf['max']['max_display_upcoming_products'] = '10';
$conf['max']['max_display_special_products'] = '6';
$conf['max']['max_display_products_new'] = '10';
$conf['max']['max_display_products_all'] = '10';
$conf['max']['max_display_products_listing'] = '10';
$conf['max']['max_display_bestsellers'] = '10';
$conf['max']['max_display_also_purchased'] = '6';
$conf['max']['max_random_select_featured_products'] = '2';
$conf['max']['max_random_select_new'] = '3';
$conf['max']['max_random_select_specials'] = '2';
$conf['max']['max_random_select_reviews'] = '1';
$conf['max']['max_display_new_reviews'] = '6';
$conf['max']['max_manufacturers_list'] = '3';
$conf['max']['products_manufacturers_status'] = '1';
$conf['max']['max_music_genres_list'] = '3';
$conf['max']['max_record_company_list'] = '3';
$conf['max']['max_display_record_company_name_len'] = '15';
$conf['max']['max_display_music_genres_name_len'] = '15';
$conf['max']['max_display_manufacturer_name_len'] = '15';
$conf['max']['max_display_categories_per_row'] = '3';
$conf['max']['max_display_products_in_order_history_box'] = '6';
$conf['max']['max_display_products_featured_products'] = '10';
$conf['max']['max_display_order_history'] = '10';
$conf['max']['max_display_search_results_customer'] = '20';
$conf['max']['max_display_search_results_orders'] = '20';
$conf['max']['max_display_search_results_reports'] = '20';
$conf['max']['max_display_results_categories'] = '10';
$conf['max']['max_row_lists_options'] = '10';
$conf['max']['max_row_lists_attributes_controller'] = '30';
$conf['max']['max_display_search_results_downloads_manager'] = '30';
$conf['max']['max_display_search_results_featured_admin'] = '10';
$conf['max']['show_new_products_limit'] = '0';
$conf['max']['max_language_flags_columns'] = '3';
$conf['max']['max_file_upload_size'] = '2048000';
$conf['max']['upload_filename_extensions'] = 'jpg,jpeg,gif,png,eps,cdr,ai,pdf,tif,tiff,bmp,zip';
$conf['max']['max_display_results_orders_details_listing'] = '0';
$conf['max']['max_display_search_results_paypal_ipn'] = '20';
$conf['max']['max_display_products_to_categories_columns'] = '3';
$conf['max']['max_display_search_results_ezpage'] = '20';
$conf['image']['small_image_width'] = '100';
$conf['image']['small_image_height'] = '80';
$conf['image']['heading_image_width'] = '57';
$conf['image']['heading_image_height'] = '40';
$conf['image']['subcategory_image_width'] = '100';
$conf['image']['subcategory_image_height'] = '57';
$conf['image']['config_calculate_image_size'] = 'true';
$conf['image']['image_required'] = 'true';
$conf['image']['image_shopping_cart_status'] = '1';
$conf['image']['image_shopping_cart_width'] = '50';
$conf['image']['image_shopping_cart_height'] = '40';
$conf['image']['category_icon_image_width'] = '57';
$conf['image']['category_icon_image_height'] = '40';
$conf['image']['subcategory_image_top_width'] = '150';
$conf['image']['subcategory_image_top_height'] = '85';
$conf['image']['medium_image_width'] = '150';
$conf['image']['medium_image_height'] = '120';
$conf['image']['image_suffix_medium'] = '_MED';
$conf['image']['image_suffix_large'] = '_LRG';
$conf['image']['images_auto_added'] = '3';
$conf['image']['image_product_listing_width'] = '100';
$conf['image']['image_product_listing_height'] = '80';
$conf['image']['image_product_new_listing_width'] = '100';
$conf['image']['image_product_new_listing_height'] = '80';
$conf['image']['image_product_new_width'] = '100';
$conf['image']['image_product_new_height'] = '80';
$conf['image']['image_featured_products_listing_width'] = '100';
$conf['image']['image_featured_products_listing_height'] = '80';
$conf['image']['image_product_all_listing_width'] = '100';
$conf['image']['image_product_all_listing_height'] = '80';
$conf['image']['products_image_no_image_status'] = '1';
$conf['image']['products_image_no_image'] = 'no_picture.gif';
$conf['image']['proportional_images_status'] = '1';
$conf['customer']['account_gender'] = 'true';
$conf['customer']['account_dob'] = 'true';
$conf['customer']['account_company'] = 'false';
$conf['customer']['account_suburb'] = 'true';
$conf['customer']['account_state'] = 'true';
$conf['customer']['account_state_draw_initial_dropdown'] = 'false';
$conf['customer']['show_create_account_default_country'] = '223';
$conf['customer']['account_fax_number'] = 'true';
$conf['customer']['account_newsletter_status'] = '1';
$conf['customer']['account_email_preference'] = '0';
$conf['customer']['customers_products_notification_status'] = '1';
$conf['customer']['customers_approval'] = '0';
$conf['customer']['customers_approval_authorization'] = '0';
$conf['customer']['customers_authorization_filename'] = 'customers_authorization';
$conf['customer']['customers_authorization_header_off'] = 'false';
$conf['customer']['customers_authorization_column_left_off'] = 'false';
$conf['customer']['customers_authorization_column_right_off'] = 'false';
$conf['customer']['customers_authorization_footer_off'] = 'false';
$conf['customer']['customers_authorization_prices_off'] = 'false';
$conf['customer']['customers_referral_status'] = '0';
$conf['module']['products_options_type_text'] = '1';
$conf['module']['products_options_type_radio'] = '2';
$conf['module']['products_options_type_checkbox'] = '3';
$conf['module']['products_options_type_file'] = '4';
$conf['module']['products_options_values_text_id'] = '0';
$conf['module']['products_options_type_readonly'] = '5';
$conf['module']['module_payment_installed'] = 'authorizenet.php;cod.php;freecharger.php;moneyorder.php;paypal.php';
$conf['module']['module_order_total_installed'] = 'ot_subtotal.php;ot_shipping.php;ot_coupon.php;ot_group_pricing.php;ot_tax.php;ot_gv.php;ot_cod_fee.php;ot_total.php';
$conf['module']['module_shipping_installed'] = 'flat.php;freeoptions.php;freeshipper.php;item.php;perweightunit.php;storepickup.php;table.php;zones.php';
$conf['module']['module_shipping_freeshipper_status'] = 'True';
$conf['module']['module_shipping_freeshipper_handling'] = '0.5';
$conf['module']['module_shipping_freeshipper_tax_class'] = '0';
$conf['module']['module_shipping_freeshipper_zone'] = '3';
$conf['module']['module_shipping_freeshipper_sort_order'] = '0';
$conf['module']['module_shipping_storepickup_status'] = 'True';
$conf['module']['module_shipping_storepickup_cost'] = '0.00';
$conf['module']['module_shipping_storepickup_tax_class'] = '0';
$conf['module']['module_shipping_storepickup_tax_basis'] = 'Shipping';
$conf['module']['module_shipping_storepickup_zone'] = '0';
$conf['module']['module_shipping_storepickup_sort_order'] = '0';
$conf['module']['module_shipping_item_status'] = 'True';
$conf['module']['module_shipping_item_cost'] = '2.50';
$conf['module']['module_shipping_item_handling'] = '0';
$conf['module']['module_shipping_item_tax_class'] = '0';
$conf['module']['module_shipping_item_tax_basis'] = 'Shipping';
$conf['module']['module_shipping_item_zone'] = '0';
$conf['module']['module_shipping_item_sort_order'] = '0';
$conf['module']['module_payment_freecharger_sort_order'] = '0';
$conf['module']['module_payment_freecharger_order_status_id'] = '0';
$conf['module']['module_payment_paypal_status'] = 'True';
$conf['module']['module_order_total_group_pricing_tax_class'] = '0';
$conf['module']['module_shipping_flat_status'] = 'True';
$conf['module']['module_shipping_flat_cost'] = '0.00';
$conf['module']['module_shipping_flat_tax_class'] = '0';
$conf['module']['module_shipping_flat_tax_basis'] = 'Shipping';
$conf['module']['module_shipping_flat_zone'] = '0';
$conf['module']['module_shipping_flat_sort_order'] = '2';
$conf['module']['default_currency'] = 'CNY';
$conf['module']['default_language'] = 'zh';
$conf['module']['default_orders_status_id'] = '1';
$conf['module']['admin_configuration_key_on'] = '0';
$conf['module']['module_order_total_gv_tax_class'] = '0';
$conf['module']['module_order_total_gv_order_status_id'] = '0';
$conf['module']['module_order_total_coupon_tax_class'] = '0';
$conf['module']['admin_demo'] = '0';
$conf['module']['module_payment_authorizenet_store_data'] = 'True';
$conf['module']['module_payment_authorizenet_sort_order'] = '0';
$conf['module']['module_payment_authorizenet_order_status_id'] = '1';
$conf['module']['module_payment_authorizenet_gateway_mode'] = 'offsite';
$conf['module']['module_payment_authorizenet_use_cvv'] = 'False';
$conf['module']['module_payment_authorizenet_email_customer'] = 'False';
$conf['module']['module_payment_authorizenet_login'] = 'testing';
$conf['module']['module_payment_authorizenet_txnkey'] = 'Test';
$conf['module']['module_payment_authorizenet_md5hash'] = '*Set A Hash Value at AuthNet Admin*';
$conf['module']['module_payment_authorizenet_testmode'] = 'Test';
$conf['module']['module_payment_authorizenet_method'] = 'Credit Card';
$conf['module']['module_payment_authorizenet_authorization_type'] = 'Authorize';
$conf['module']['module_payment_cod_sort_order'] = '0';
$conf['module']['module_payment_cod_order_status_id'] = '2';
$conf['module']['module_payment_moneyorder_sort_order'] = '0';
$conf['module']['module_payment_moneyorder_order_status_id'] = '0';
$conf['module']['module_payment_authorizenet_status'] = 'True';
$conf['module']['module_shipping_freeoptions_status'] = 'True';
$conf['module']['module_shipping_freeoptions_cost'] = '0.00';
$conf['module']['module_shipping_freeoptions_handling'] = '0';
$conf['module']['module_shipping_freeoptions_total_min'] = '0.00';
$conf['module']['module_shipping_freeoptions_total_max'] = '';
$conf['module']['module_shipping_freeoptions_weight_min'] = '0';
$conf['module']['module_shipping_freeoptions_weight_max'] = '';
$conf['module']['module_shipping_freeoptions_items_min'] = '';
$conf['module']['module_shipping_freeoptions_items_max'] = '';
$conf['module']['module_shipping_freeoptions_tax_class'] = '0';
$conf['module']['module_shipping_freeoptions_tax_basis'] = 'Shipping';
$conf['module']['module_shipping_freeoptions_zone'] = '0';
$conf['module']['module_shipping_freeoptions_sort_order'] = '0';
$conf['module']['module_shipping_perweightunit_status'] = 'True';
$conf['module']['module_shipping_perweightunit_cost'] = '1';
$conf['module']['module_shipping_perweightunit_handling'] = '0';
$conf['module']['module_shipping_perweightunit_handling_method'] = 'Order';
$conf['module']['module_shipping_perweightunit_tax_class'] = '0';
$conf['module']['module_shipping_perweightunit_tax_basis'] = 'Shipping';
$conf['module']['module_shipping_perweightunit_zone'] = '0';
$conf['module']['module_shipping_perweightunit_sort_order'] = '0';
$conf['module']['module_shipping_table_status'] = 'True';
$conf['module']['module_shipping_table_cost'] = '25:8.50,50:5.50,10000:0.00';
$conf['module']['module_shipping_table_mode'] = 'price';
$conf['module']['module_shipping_table_handling'] = '0';
$conf['module']['module_shipping_table_handling_method'] = 'Order';
$conf['module']['module_shipping_table_tax_class'] = '0';
$conf['module']['module_shipping_table_tax_basis'] = 'Shipping';
$conf['module']['module_shipping_table_zone'] = '0';
$conf['module']['module_shipping_table_sort_order'] = '0';
$conf['module']['module_shipping_zones_status'] = 'True';
$conf['module']['module_shipping_zones_method'] = 'Price';
$conf['module']['module_shipping_zones_tax_class'] = '0';
$conf['module']['module_shipping_zones_tax_basis'] = 'Shipping';
$conf['module']['module_shipping_zones_sort_order'] = '0';
$conf['module']['module_shipping_zones_skipped'] = '';
$conf['module']['module_shipping_zones_countries_1'] = 'US,CA';
$conf['module']['module_shipping_zones_cost_1'] = '3:8.50,7:10.50,99:20.00';
$conf['module']['module_shipping_zones_handling_1'] = '0';
$conf['module']['module_shipping_zones_handling_method_1'] = 'Order';
$conf['module']['module_shipping_zones_countries_2'] = '';
$conf['module']['module_shipping_zones_cost_2'] = '3:8.50,7:10.50,99:20.00';
$conf['module']['module_shipping_zones_handling_2'] = '0';
$conf['module']['module_shipping_zones_handling_method_2'] = 'Order';
$conf['module']['module_shipping_zones_countries_3'] = '';
$conf['module']['module_shipping_zones_cost_3'] = '3:8.50,7:10.50,99:20.00';
$conf['module']['module_shipping_zones_handling_3'] = '0';
$conf['module']['module_shipping_zones_handling_method_3'] = 'Order';
$conf['module']['module_payment_authorizenet_debugging'] = 'Alerts Only';
$conf['module']['module_payment_freecharger_status'] = 'True';
$conf['module']['module_order_total_group_pricing_status'] = 'true';
$conf['module']['module_order_total_gv_status'] = 'true';
$conf['module']['module_order_total_shipping_status'] = 'true';
$conf['module']['module_order_total_subtotal_status'] = 'true';
$conf['module']['module_order_total_tax_status'] = 'true';
$conf['module']['module_order_total_total_status'] = 'true';
$conf['module']['module_order_total_coupon_status'] = 'true';
$conf['module']['module_payment_cod_status'] = 'True';
$conf['module']['module_payment_moneyorder_status'] = 'True';
$conf['module']['module_payment_moneyorder_payto'] = 'my store';
$conf['module']['module_order_total_cod_status'] = 'false';
$conf['module']['module_payment_freecharger_zone'] = '0';
$conf['module']['module_payment_paypal_business_id'] = 'support@zen-cart.cn';
$conf['module']['module_order_total_group_pricing_sort_order'] = '290';
$conf['module']['module_order_total_gv_sort_order'] = '840';
$conf['module']['module_order_total_shipping_sort_order'] = '200';
$conf['module']['module_order_total_subtotal_sort_order'] = '100';
$conf['module']['module_order_total_tax_sort_order'] = '300';
$conf['module']['module_order_total_total_sort_order'] = '999';
$conf['module']['module_order_total_coupon_sort_order'] = '280';
$conf['module']['module_payment_authorizenet_zone'] = '0';
$conf['module']['module_payment_cod_zone'] = '0';
$conf['module']['module_payment_moneyorder_zone'] = '0';
$conf['module']['module_order_total_cod_sort_order'] = '950';
$conf['module']['module_payment_paypal_currency'] = 'Selected Currency';
$conf['module']['module_order_total_gv_queue'] = 'true';
$conf['module']['module_order_total_shipping_free_shipping'] = 'false';
$conf['module']['module_order_total_cod_fee_flat'] = 'AT:3.00,DE:3.58,00:9.99';
$conf['module']['module_order_total_cod_fee_free'] = 'US:3.00';
$conf['module']['module_order_total_cod_fee_freeshipper'] = 'CA:4.50,US:3.00,00:9.99';
$conf['module']['module_order_total_cod_fee_freeoptions'] = 'CA:4.50,US:3.00,00:9.99';
$conf['module']['module_order_total_cod_fee_perweightunit'] = 'CA:4.50,US:3.00,00:9.99';
$conf['module']['module_payment_paypal_zone'] = '0';
$conf['module']['module_order_total_shipping_free_shipping_over'] = '50';
$conf['module']['module_order_total_cod_fee_item'] = 'AT:3.00,DE:3.58,00:9.99';
$conf['module']['module_payment_paypal_processing_status_id'] = '1';
$conf['module']['module_order_total_group_pricing_inc_shipping'] = 'false';
$conf['module']['module_order_total_gv_inc_shipping'] = 'true';
$conf['module']['module_order_total_shipping_destination'] = 'national';
$conf['module']['module_order_total_coupon_inc_shipping'] = 'false';
$conf['module']['module_order_total_cod_fee_table'] = 'AT:3.00,DE:3.58,00:9.99';
$conf['module']['module_shipping_freeshipper_cost'] = '5.00';
$conf['module']['module_payment_paypal_order_status_id'] = '2';
$conf['module']['module_order_total_group_pricing_inc_tax'] = 'false';
$conf['module']['entry_email_address_check'] = 'false';
$conf['module']['module_order_total_gv_inc_tax'] = 'true';
$conf['module']['module_order_total_coupon_inc_tax'] = 'false';
$conf['module']['module_order_total_cod_fee_ups'] = 'CA:4.50,US:3.00,00:9.99';
$conf['module']['module_payment_paypal_refund_order_status_id'] = '1';
$conf['module']['module_order_total_group_pricing_calc_tax'] = 'Standard';
$conf['module']['module_order_total_gv_calc_tax'] = 'None';
$conf['module']['module_order_total_coupon_calc_tax'] = 'Standard';
$conf['module']['module_order_total_cod_fee_usps'] = 'CA:4.50,US:3.00,00:9.99';
$conf['module']['module_payment_paypal_sort_order'] = '0';
$conf['module']['module_order_total_gv_credit_tax'] = 'false';
$conf['module']['module_order_total_cod_fee_zones'] = 'CA:4.50,US:3.00,00:9.99';
$conf['module']['module_order_total_cod_fee_ap'] = 'AT:3.63,00:9.99';
$conf['module']['module_order_total_cod_fee_dp'] = 'DE:3.58,00:9.99';
$conf['module']['module_order_total_cod_fee_servicepakke'] = 'NO:69';
$conf['module']['search_engine_friendly_urls'] = 'false';
$conf['module']['module_order_total_cod_fee_fedex'] = 'US:3.00';
$conf['module']['module_payment_paypal_address_override'] = '1';
$conf['module']['module_payment_paypal_address_required'] = '2';
$conf['module']['module_payment_paypal_detailed_cart'] = 'No';
$conf['module']['module_payment_paypal_page_style'] = 'Primary';
$conf['module']['module_payment_paypal_pdttoken'] = '';
$conf['module']['module_order_total_cod_tax_class'] = '0';
$conf['module']['curl_proxy_required'] = 'False';
$conf['module']['curl_proxy_server_details'] = '';
$conf['module']['module_payment_paypal_ipn_debug'] = 'Off';
$conf['module']['module_payment_paypal_debug_email_address'] = 'admin@zen-cart.cn';
$conf['module']['module_payment_paypal_handler'] = 'www.paypal.com/cgi-bin/webscr';
$conf['module']['sslpwstatuscheck'] = '';
$conf['shipping']['shipping_origin_country'] = '44';
$conf['shipping']['shipping_origin_zip'] = '400000';
$conf['shipping']['shipping_max_weight'] = '50';
$conf['shipping']['shipping_box_weight'] = '0:3';
$conf['shipping']['shipping_box_padding'] = '10:0';
$conf['shipping']['shipping_box_weight_display'] = '3';
$conf['shipping']['order_weight_zero_status'] = '1';
$conf['shipping']['show_shipping_estimator_button'] = '2';
$conf['shipping']['order_comments_invoice'] = '2';
$conf['shipping']['order_comments_packing_slip'] = '2';
$conf['product_list']['product_list_image'] = '1';
$conf['product_list']['product_list_manufacturer'] = '0';
$conf['product_list']['product_list_model'] = '0';
$conf['product_list']['product_list_name'] = '2';
$conf['product_list']['product_list_price'] = '3';
$conf['product_list']['product_list_quantity'] = '0';
$conf['product_list']['product_list_weight'] = '0';
$conf['product_list']['products_list_price_width'] = '125';
$conf['product_list']['product_list_filter'] = '1';
$conf['product_list']['prev_next_bar_location'] = '3';
$conf['product_list']['product_listing_default_sort_order'] = '';
$conf['product_list']['product_list_price_buy_now'] = '1';
$conf['product_list']['product_listing_multiple_add_to_cart'] = '3';
$conf['product_list']['product_list_description'] = '150';
$conf['product_list']['product_list_sort_order_ascending'] = '+';
$conf['product_list']['product_list_sort_order_descending'] = '-';
$conf['product_list']['product_list_alpha_sorter'] = 'true';
$conf['product_list']['product_list_categories_image_status'] = 'true';
$conf['product_list']['product_list_categories_image_status_top'] = 'true';
$conf['product_list']['product_list_category_row_status'] = '1';
$conf['quantity']['stock_check'] = 'true';
$conf['quantity']['stock_limited'] = 'true';
$conf['quantity']['stock_allow_checkout'] = 'true';
$conf['quantity']['stock_mark_product_out_of_stock'] = '***';
$conf['quantity']['stock_reorder_level'] = '5';
$conf['quantity']['show_products_sold_out'] = '0';
$conf['quantity']['show_products_sold_out_image'] = '1';
$conf['quantity']['quantity_decimals'] = '0';
$conf['quantity']['show_shopping_cart_delete'] = '3';
$conf['quantity']['show_shopping_cart_update'] = '3';
$conf['quantity']['show_shopping_cart_empty_new_products'] = '1';
$conf['quantity']['show_shopping_cart_empty_featured_products'] = '2';
$conf['quantity']['show_shopping_cart_empty_specials_products'] = '3';
$conf['quantity']['show_shopping_cart_empty_upcoming'] = '4';
$conf['quantity']['show_shopping_cart_combined'] = '1';
$conf['log']['store_page_parse_time'] = 'false';
$conf['log']['store_page_parse_time_log'] = 'G:/WWW/zencart151/cache/page_parse_time.log';
$conf['log']['store_parse_date_time_format'] = '%d/%m/%Y %H:%M:%S';
$conf['log']['display_page_parse_time'] = 'false';
$conf['log']['store_db_transactions'] = 'false';
$conf['email']['email_transport'] = 'smtpauth';
$conf['email']['email_linefeed'] = 'LF';
$conf['email']['email_use_html'] = 'false';
$conf['email']['send_emails'] = 'true';
$conf['email']['email_archive'] = 'false';
$conf['email']['email_friendly_errors'] = 'true';
$conf['email']['store_owner_email_address'] = 'tiehuoban@163.com';
$conf['email']['email_from'] = 'tiehuoban@163.com';
$conf['email']['email_send_must_be_store'] = 'Yes';
$conf['email']['admin_extra_email_format'] = 'TEXT';
$conf['email']['send_extra_order_emails_to'] = 'tiehuoban@163.com';
$conf['email']['send_extra_create_account_emails_to_status'] = '0';
$conf['email']['send_extra_create_account_emails_to'] = 'tiehuoban@163.com';
$conf['email']['send_extra_gv_customer_emails_to_status'] = '0';
$conf['email']['send_extra_gv_customer_emails_to'] = 'tiehuoban@163.com';
$conf['email']['send_extra_gv_admin_emails_to_status'] = '0';
$conf['email']['send_extra_gv_admin_emails_to'] = 'tiehuoban@163.com';
$conf['email']['send_extra_discount_coupon_admin_emails_to_status'] = '0';
$conf['email']['send_extra_discount_coupon_admin_emails_to'] = 'tiehuoban@163.com';
$conf['email']['send_extra_orders_status_admin_emails_to_status'] = '0';
$conf['email']['send_extra_orders_status_admin_emails_to'] = 'tiehuoban@163.com';
$conf['email']['send_extra_review_notification_emails_to_status'] = '0';
$conf['email']['send_extra_review_notification_emails_to'] = 'tiehuoban@163.com';
$conf['email']['contact_us_list'] = '';
$conf['email']['contact_us_store_name_address'] = '1';
$conf['email']['send_lowstock_email'] = '0';
$conf['email']['send_extra_low_stock_emails_to'] = 'tiehuoban@163.com';
$conf['email']['show_newsletter_unsubscribe_link'] = 'true';
$conf['email']['audience_select_display_counts'] = 'true';
$conf['email']['email_smtpauth_mailbox'] = 'tiehuoban@163.com';
$conf['email']['email_smtpauth_password'] = '3g7529021021';
$conf['email']['email_smtpauth_mail_server'] = 'smtp.163.com';
$conf['email']['email_smtpauth_mail_server_port'] = '25';
$conf['email']['currencies_translations'] = '¥';
$conf['attribute']['download_enabled'] = 'true';
$conf['attribute']['download_by_redirect'] = 'true';
$conf['attribute']['download_in_chunks'] = 'false';
$conf['attribute']['download_max_days'] = '7';
$conf['attribute']['download_max_count'] = '5';
$conf['attribute']['downloads_orders_status_updated_value'] = '4';
$conf['attribute']['downloads_controller_orders_status'] = '2';
$conf['attribute']['downloads_controller_orders_status_end'] = '4';
$conf['attribute']['attributes_enabled_price_factor'] = 'true';
$conf['attribute']['attributes_enabled_qty_prices'] = 'true';
$conf['attribute']['attributes_enabled_images'] = 'true';
$conf['attribute']['attributes_enabled_text_prices'] = 'true';
$conf['attribute']['text_spaces_free'] = '1';
$conf['attribute']['products_options_type_readonly_ignored'] = '1';
$conf['compress']['gzip_level'] = '0';
$conf['session']['session_write_directory'] = 'G:/WWW/zencart151/cache';
$conf['session']['session_use_fqdn'] = 'True';
$conf['session']['session_force_cookie_use'] = 'False';
$conf['session']['session_check_ssl_session_id'] = 'False';
$conf['session']['session_check_user_agent'] = 'False';
$conf['session']['session_check_ip_address'] = 'False';
$conf['session']['session_block_spiders'] = 'True';
$conf['session']['session_recreate'] = 'True';
$conf['session']['session_ip_to_host_address'] = 'false';
$conf['session']['session_use_root_cookie_path'] = 'False';
$conf['session']['session_add_period_prefix'] = 'True';
$conf['cupon']['default_zero_balance_orders_status_id'] = '2';
$conf['agreement']['display_conditions_on_checkout'] = 'true';
$conf['cupon']['security_code_length'] = '10';
$conf['agreement']['display_privacy_conditions'] = 'true';
$conf['cupon']['new_signup_discount_coupon'] = '';
$conf['cupon']['new_signup_gift_voucher_amount'] = '';
$conf['cupon']['max_display_search_results_discount_coupons'] = '20';
$conf['cupon']['max_display_search_results_discount_coupons_reports'] = '20';
$conf['pay']['cc_enabled_visa'] = '1';
$conf['pay']['cc_enabled_mc'] = '1';
$conf['pay']['cc_enabled_amex'] = '0';
$conf['pay']['cc_enabled_diners_club'] = '0';
$conf['pay']['cc_enabled_discover'] = '0';
$conf['pay']['cc_enabled_jcb'] = '0';
$conf['pay']['cc_enabled_australian_bankcard'] = '0';
$conf['pay']['cc_enabled_solo'] = '0';
$conf['pay']['cc_enabled_switch'] = '0';
$conf['pay']['cc_enabled_maestro'] = '0';
$conf['pay']['show_accepted_credit_cards'] = '0';
$conf['product_info']['show_previous_next_status'] = '1';
$conf['product_info']['product_info_categories'] = '1';
$conf['product_info']['product_info_categories_image_status'] = '2';
$conf['product_info']['product_info_previous_next'] = '1';
$conf['product_info']['show_previous_next_images'] = '2';
$conf['product_info']['product_info_previous_next_sort'] = '1';
$conf['product_info']['previous_next_image_width'] = '50';
$conf['product_info']['previous_next_image_height'] = '40';
$conf['product_info']['products_options_sort_order'] = '0';
$conf['product_info']['products_options_sort_by_price'] = '1';
$conf['product_info']['product_images_attributes_names'] = '1';
$conf['product_info']['show_sale_discount_status'] = '1';
$conf['product_info']['show_sale_discount'] = '1';
$conf['product_info']['show_sale_discount_decimals'] = '0';
$conf['product_info']['other_image_price_is_free_on'] = '1';
$conf['product_info']['products_price_is_call_image_on'] = '1';
$conf['product_info']['products_qty_box_status'] = '1';
$conf['product_info']['reviews_approval'] = '1';
$conf['product_info']['meta_tag_include_model'] = '1';
$conf['product_info']['meta_tag_include_price'] = '1';
$conf['product_info']['max_meta_tag_description_length'] = '50';
$conf['product_info']['show_product_info_columns_also_purchased_products'] = '3';
$conf['layout']['box_width_left'] = '170px';
$conf['layout']['box_width_right'] = '140px';
$conf['layout']['bread_crumbs_separator'] = ' :: ';
$conf['layout']['define_breadcrumb_status'] = '1';
$conf['layout']['best_sellers_filler'] = ' ';
$conf['layout']['best_sellers_truncate'] = '35';
$conf['layout']['best_sellers_truncate_more'] = 'true';
$conf['layout']['show_shopping_cart_box_status'] = '1';
$conf['layout']['show_categories_box_specials'] = 'true';
$conf['layout']['show_categories_box_products_new'] = 'true';
$conf['layout']['show_categories_box_featured_products'] = 'true';
$conf['layout']['show_categories_box_products_all'] = 'true';
$conf['layout']['column_left_status'] = '1';
$conf['layout']['column_right_status'] = '1';
$conf['layout']['column_width_left'] = '170px';
$conf['layout']['column_width_right'] = '140px';
$conf['layout']['show_categories_separator_link'] = '1';
$conf['layout']['categories_separator'] = '';
$conf['layout']['categories_separator_subs'] = '';
$conf['layout']['categories_count_prefix'] = ' (';
$conf['layout']['categories_count_suffix'] = ')';
$conf['layout']['categories_subcategories_indent'] = '  ';
$conf['layout']['categories_count_zero'] = '0';
$conf['layout']['categories_split_display'] = 'True';
$conf['layout']['show_totals_in_cart'] = '1';
$conf['layout']['show_customer_greeting'] = '1';
$conf['layout']['show_categories_always'] = '0';
$conf['layout']['categories_start_main'] = '0';
$conf['layout']['show_categories_subcategories_always'] = '1';
$conf['layout']['show_banners_group_set1'] = 'Wide-Banners';
$conf['layout']['show_banners_group_set2'] = 'Wide-Banners';
$conf['layout']['show_banners_group_set3'] = 'SideBox-Banners';
$conf['layout']['show_banners_group_set4'] = 'SideBox-Banners';
$conf['layout']['show_banners_group_set5'] = 'BannersAll';
$conf['layout']['show_banners_group_set6'] = 'BannersAll';
$conf['layout']['show_banners_group_set7'] = 'SideBox-Banners';
$conf['layout']['show_banners_group_set8'] = 'SideBox-Banners';
$conf['layout']['show_banners_group_set_all'] = 'BannersAll';
$conf['layout']['show_footer_ip'] = '1';
$conf['layout']['discount_qty_add'] = '5';
$conf['layout']['discount_quantity_prices_column'] = '5';
$conf['layout']['categories_products_sort_order'] = '0';
$conf['layout']['option_names_values_global_status'] = '1';
$conf['layout']['categories_tabs_status'] = '1';
$conf['layout']['show_account_links_on_site_map'] = 'No';
$conf['layout']['skip_single_product_categories'] = 'True';
$conf['layout']['use_split_login_mode'] = 'False';
$conf['layout']['image_use_css_buttons'] = 'No';
$conf['maintain']['down_for_maintenance'] = 'false';
$conf['maintain']['down_for_maintenance_filename'] = 'down_for_maintenance';
$conf['maintain']['down_for_maintenance_header_off'] = 'false';
$conf['maintain']['down_for_maintenance_column_left_off'] = 'false';
$conf['maintain']['down_for_maintenance_column_right_off'] = 'false';
$conf['maintain']['down_for_maintenance_footer_off'] = 'false';
$conf['maintain']['down_for_maintenance_prices_off'] = 'false';
$conf['maintain']['exclude_admin_ip_for_maintenance'] = '您的IP地址(管理员)';
$conf['maintain']['warn_before_down_for_maintenance'] = 'false';
$conf['maintain']['period_before_down_for_maintenance'] = '2003/05/15  2-3 PM';
$conf['maintain']['display_maintenance_time'] = 'false';
$conf['maintain']['display_maintenance_period'] = 'false';
$conf['maintain']['text_maintenance_period_time'] = '2h00';
$conf['product_new']['product_new_list_image'] = '1102';
$conf['product_new']['product_new_list_quantity'] = '1202';
$conf['product_new']['product_new_buy_now'] = '1300';
$conf['product_new']['product_new_list_name'] = '2101';
$conf['product_new']['product_new_list_model'] = '2201';
$conf['product_new']['product_new_list_manufacturer'] = '2302';
$conf['product_new']['product_new_list_price'] = '2402';
$conf['product_new']['product_new_list_weight'] = '2502';
$conf['product_new']['product_new_list_date_added'] = '2601';
$conf['product_new']['product_new_list_description'] = '150';
$conf['product_new']['product_new_list_sort_default'] = '6';
$conf['product_new']['product_new_list_group_id'] = '21';
$conf['product_new']['product_new_listing_multiple_add_to_cart'] = '3';
$conf['product_new']['show_new_products_upcoming_masked'] = '0';
$conf['product_featured']['product_featured_list_image'] = '1102';
$conf['product_featured']['product_featured_list_quantity'] = '1202';
$conf['product_featured']['product_featured_buy_now'] = '1300';
$conf['product_featured']['product_featured_list_name'] = '2101';
$conf['product_featured']['product_featured_list_model'] = '2201';
$conf['product_featured']['product_featured_list_manufacturer'] = '2302';
$conf['product_featured']['product_featured_list_price'] = '2402';
$conf['product_featured']['product_featured_list_weight'] = '2502';
$conf['product_featured']['product_featured_list_date_added'] = '2601';
$conf['product_featured']['product_featured_list_description'] = '150';
$conf['product_featured']['product_featured_list_sort_default'] = '1';
$conf['product_featured']['product_featured_list_group_id'] = '22';
$conf['product_featured']['product_featured_listing_multiple_add_to_cart'] = '3';
$conf['product_all']['product_all_list_image'] = '1102';
$conf['product_all']['product_all_list_quantity'] = '1202';
$conf['product_all']['product_all_buy_now'] = '1300';
$conf['product_all']['product_all_list_name'] = '2101';
$conf['product_all']['product_all_list_model'] = '2201';
$conf['product_all']['product_all_list_manufacturer'] = '2302';
$conf['product_all']['product_all_list_price'] = '2402';
$conf['product_all']['product_all_list_weight'] = '2502';
$conf['product_all']['product_all_list_date_added'] = '2601';
$conf['product_all']['product_all_list_description'] = '150';
$conf['product_all']['product_all_list_sort_default'] = '1';
$conf['product_all']['product_all_list_group_id'] = '23';
$conf['product_all']['product_all_listing_multiple_add_to_cart'] = '3';
$conf['product_index']['show_product_info_main_new_products'] = '1';
$conf['product_index']['show_product_info_main_featured_products'] = '2';
$conf['product_index']['show_product_info_main_specials_products'] = '3';
$conf['product_index']['show_product_info_main_upcoming'] = '4';
$conf['product_index']['show_product_info_category_new_products'] = '1';
$conf['product_index']['show_product_info_category_featured_products'] = '2';
$conf['product_index']['show_product_info_category_specials_products'] = '3';
$conf['product_index']['show_product_info_category_upcoming'] = '4';
$conf['product_index']['show_product_info_missing_new_products'] = '1';
$conf['product_index']['show_product_info_missing_featured_products'] = '2';
$conf['product_index']['show_product_info_missing_specials_products'] = '3';
$conf['product_index']['show_product_info_missing_upcoming'] = '4';
$conf['product_index']['show_product_info_listing_below_new_products'] = '1';
$conf['product_index']['show_product_info_listing_below_featured_products'] = '2';
$conf['product_index']['show_product_info_listing_below_specials_products'] = '3';
$conf['product_index']['show_product_info_listing_below_upcoming'] = '4';
$conf['product_index']['show_product_info_columns_new_products'] = '3';
$conf['product_index']['show_product_info_columns_featured_products'] = '3';
$conf['product_index']['show_product_info_columns_specials_products'] = '3';
$conf['product_index']['show_product_info_all_products'] = '1';
$conf['product_page']['define_main_page_status'] = '1';
$conf['product_page']['define_contact_us_status'] = '1';
$conf['product_page']['define_privacy_status'] = '1';
$conf['product_page']['define_shippinginfo_status'] = '1';
$conf['product_page']['define_conditions_status'] = '1';
$conf['product_page']['define_checkout_success_status'] = '1';
$conf['product_page']['define_discount_coupon_status'] = '1';
$conf['product_page']['define_site_map_status'] = '1';
$conf['product_page']['define_page_not_found_status'] = '1';
$conf['product_page']['define_page_2_status'] = '1';
$conf['product_page']['define_page_3_status'] = '1';
$conf['product_page']['define_page_4_status'] = '1';
$conf['']['ezpages_status_header'] = '1';
$conf['']['ezpages_status_footer'] = '1';
$conf['']['ezpages_status_sidebox'] = '1';
$conf['']['ezpages_separator_header'] = '::';
$conf['']['ezpages_separator_footer'] = '::';
$conf['']['ezpages_show_prev_next_buttons'] = '2';
$conf['']['ezpages_show_table_contents'] = '1';
$conf['']['ezpages_disable_header_display_list'] = '';
$conf['']['ezpages_disable_footer_display_list'] = '';
$conf['']['ezpages_disable_leftcolumn_display_list'] = '';
$conf['']['ezpages_disable_rightcolumn_display_list'] = '';

</code></code>

回复内容:

<code>$sql = 'select c.config_key as ck,c.config_value as cv,cg.config_group_key as cgk from '.
       zen_get_table_name('config').' c, '.zen_get_table_name('config_group').' cg where c.config_group_id=
       cg.config_group_id order by cg.config_sort_order,c.config_sort_order';

$config = $zen_db->Execute($sql);

$zen_str = '<?php if(!defined(ZEN_ADMIN)){die(\'illegal access\');}'."\n";
while(!$config->end)
{
    $zen_str .= '$conf[\''.$config->field['cgk'].'\'][\''.$config->field['ck'].'\'] = \''.$config -> field['cv']."';\n";

    $config->move_next();
}
file_put_contents($conf['path']['config'].'/config.php',$zen_str);
var_dump($zen_str);
</code>

就是从数据库取出的三个字段的多行的值组成的数组的字符串不知道为什么使用var_dump()这样的函数无法打印出字符串呢?
下面是写入一个文件中的内容:

<code></code>
陳述:
本文內容由網友自願投稿,版權歸原作者所有。本站不承擔相應的法律責任。如發現涉嫌抄襲或侵權的內容,請聯絡admin@php.cn