Generate Settings

 

Template Path of the template. The default template is a npm package installed under the node_modules folder, e.g. C:\Users\<user>\AppData\Roaming\PHPMaker<version>\node_modules\@phpmaker\php<version>
Project folder The folder where the PHP scripts are to be generated.
Start page Specify the first page that the default page should redirect users to. This setting is optional, usually it can be left blank, the index page will simply direct users to the List page of the default table (see Table Setup) or the first table that the user have permission to access.

If this setting is not blank, the index page will redirect user to the path you specify.

Notes 1. DO NOT enter index or index.php, otherwise there will be a indefinite loop. 1. If you enable **Lowercase routes** (see below), make sure you enter your route in lowercase. 1. This setting can also be a callable, e.g. ``MyFunction``, ``MyClass::myStaticMethod``. You can put your function or class in [Global Code](customscripts.html?id=global-code).
Lowercase routes Specify whether routes are in lowercase.
Note This setting does not affect classes and views which are always outputted in Pascal case.
Clear project folder first Specify whether to delete all files previously generated by PHPMaker first. If you have changed target PHP version or some table names in your project, some old files may be left in the project folder preventing successful "composer update", then you should enable this setting to generate all files again.
Debug Enable [Debugging](debug.html) features for the project.
Composer update Specify whether to call ``composer update`` after generation. By default PHPMaker will call it automatically when necessary, but sometimes you may want to call it explicitly by checking this option. If you are not familiar with Composer, read [Composer](composer.html) first.
Browse after generation Specify whether to open a browser to test the generated site after script generation.
Testing root URL Specify the URL of your testing site that maps to the Project folder (see above). For use with Browse after generation.

After setting above, click the Generate button to generate scripts. PHPMaker allows you select scripts to generate, just select the files you want to generate in the Output column. If you want include PHPMaker scripts into your custom PHP scripts, you may not want to generate header and footer in those pages. Then you can enable No header/footer for those pages. Note that header/footer means the header row containing the site header logo and the footer row containing the site footer text.

After selection, click the Generate button to generate scripts.

If you modify settings for a table and want to re-generate script for that table only, you can click Unselect All, then select the files you want to re-generate and click the Generate button to generate again. If you are not sure which files to re-generate, click Select All and re-generate all files.

If you generate selected files only, you can use the Search box to find the files you want to select/unselect.

You can also right-click the column header of Output or No header/footer to quickly select all or unselect all items in the column.

Finally, press the **Generate** button to generate scripts.

Notes
  1. If it is your first generation or you have changed some project level settings, you must select Other files to generate the non table-specific pages.
  2. You can press F9 to skip above form and generate all scripts.
  3. You can press Ctrl + F9 to skip above form and re-generate previously selected scripts.
  4. You can change the color schema of the progress window by changing the advanced setting **Progress window color scheme**. If you want to customize the colors, you can select _"Custom"_ and then modify the _"Custom"_ scheme in the file _src/schemes.json_. The color settings are same as Windows Terminal color schemes.
  5. By default the progress window auto-closes after generation if no errors found. If you want to keep it open so you can study the log, you can disable the advanced setting **Auto close progress window**.
Regeneration by CLI Commands
You can also quickly re-generate your project by running a CLI command at the PHPMaker folder (e.g. C:\Users\\<user>\AppData\Roaming\phpmaker<version>). Supported commands are: | Command | Description | |-------|-------| | ``npm run generate`` | Re-generate previously selected script (similar to **Ctrl + F9** in UI) | | ``npm run generate-all`` | Re-generate all files (similar to **F9** in UI) | | ``npm run generate-log`` | Re-generate previously selected script and redirect the output to a log file named *phpmaker.log* in the PHPMaker folder | | ``npm run generate-all-log`` | Re-generate all files and redirect the output to a log file named *phpmaker.log* in the PHPMaker folder | If you see warnings and/or errors during generation, you can use the commands that generates log file (e.g. C:\Users\\<user>\AppData\Roaming\phpmaker<version>\phpmaker.log) and study the log.
**Note** These CLI commands re-generate the last project. If you have not generated any projects before, they will not work.

 

 

Also See

Customizing Template
Project File

 

 ©2002-2025 e.World Technology Ltd. All rights reserved.