Friday 04 June 2010 8:09:02 am
For this tutorial, we are going to stick to running the script from the command line. To do this, we are going to create a script within the directory /bin/php which is found in the root of your eZ Publish site. This script is the standard layout for an eZ Publish PHP script. To make debugging easier for us, I have enabled it in the script options. Once you are happy with your code, set the debug options to false.
Code :
<?php set_time_limit ( 0 ); require 'autoload.php'; $cli = eZCLI::instance(); $db = eZDB::instance(); $script = eZScript::instance( array( 'description' => ( "eZ Publish data import.\n\n" . "Simple import script for use with eZ Publish"), 'use-session' => false, 'use-modules' => true, 'use-extensions' => true, 'debug-output' => true, 'debug-message' =>true) ); $script->startup(); $script->initialize(); /***************************** Our Functionality will go here *****************************/ $script->shutdown(); ?>