Location: PHPKode > scripts > PHP 2 Install > php-2-install/sample3.php
This example generates an installer for a site in the directory dir_name


Este exemplo gera um instalador para um site no diretório dir_name
	include ("./php2install.class.php");
	$vgoInstall	 =  new php2install ();
	$vgoInstall	 -> setEncodePath ("./dir_name");
	$vgoInstall	 -> setDecodePath ("./path/out_file.php");
	// It indicates that the site will be generated in the same directory
	// Indica que o site sera gerado no mesmo diretório
	$vgoInstall	 -> setDecodeNewPath (".");
	// This line generates a form to substitute <!--{dbname}-->, <!--{user}-->, <!--{password}-->, <!--{host}-->, for the typed values
	// Este campo gera um formulário para substituir <!--{dbname}-->, <!--{user}-->, <!--{password}-->, <!--{host}-->, pelos valores digitados 
	$vgoInstall	 -> setReplaceForm (array ("Db name:", "User:", "Password", "Host"), array ("dbname", "user", "password", "host"), array ("Enter db name", "Enter user name", "Enter password", "Enter host<br>Example:"));
	$vgoInstall	 -> encodeTree ();
Return current item: PHP 2 Install