bjr à tous , je dispose d'un script php5 qui permet de convertir un fichier csv en xml. j'utilise Windoxs XP . mais j'arrive pas à exécuter le script. j'obtient le message suivant: "use input file.csv outputfile .xml"
En fait j'essaie de convertir un plan comptable déjà en csv en xml . voici le script: <?php /* Tool name: ons_csv2xml.php Tool release: v1.0 Copyright notice: Copyright (C) 2008 Open Net SaRL Software license: GNU General Public License v2.0
Notice: This program is free software; you can redistribute it and/or modify it under the terms of version 2.0 of the GNU General Public License as published by the Free Software Foundation.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of version 2.0 of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
END COPYRIGHT, LICENSE AND WARRANTY NOTICE
Purpose: Reads a CSV file and outputs an XML file so that the generated file can be used in a Tiny ERP plugin
Details: each input line: - is splitted into an XML record - may reference a parent record
*/
// ----------------------- Parameters from the command line // $argc = $_SERVER[ 'argc' ]; $argv = $_SERVER[ 'argv' ]; if ( $argc < 2 ) { exit("Use: ".$argv[0]. " input_file.csv output_file.xml\n" } $input = $argv[1]; $output = $argv[2];
// ----------------------- Settings //
// XML header and footer $header = "<?xml version=\"1.0\" encoding=\"UTF-8\"?><terp> \t<data noupdate=\"True\"> "; $footer = "\t</data> </terp>";
// The code field is also used to build the record ID $code_field = 1; $v = $fields[ $code_field ]; $a_code_search = $v[ 1 ]; $a_code_replace = $v[ 2 ];
j'eesaie de convertir mon fichier csv à l'aide de wampserver. j'obtient le message suivant : The cgi handler has not been set! do you want to configure it now?