This example describes the Thinkphp custom code generation tool and usage instructions. Share to everyone for your reference, specific as follows:
My recent frustration has been that I've been doing repetitive things with thinkphp, such as repeating the simplest crud methods, writing forms, writing foreground style sheets, and so on.
Thinkphp's support for background operations is already very strong, coupled with the recent very popular bootstrap framework makes the foreground style easy to follow a standard, so I decided to start writing a code generator that belongs to me.
I want it to be simple enough to make people understand that it's good to have a stable generation of crud code for both MySQL and SQLite databases, and it would be nice if you could also generate some view code that conforms to the bootstrap framework.
After about more than 10 hours of struggle, Thinkphphelper was born!
It has only one file that supports MySQL and SQLite databases, fast generation of pre and aft crud code snippets, and reduced duplication of work. And only one file, lightweight and convenient.
All you have to do is configure the database information and put it in the action directory of your project file, and then call it like this:
Http://[your project address]/index.php/thinkphphelper
I've written all the stylesheets into this file, make it easy for you to copy and paste into any thinkphp project where the bootstrap and jquery related files are read from a CDN on the network, so it's best to keep your network open if you don't have a network. You can modify the relevant address yourself.
Smart, you must know how it's used, right?
attached: thinkphp code generator click here Download the site .
Directly generate the front and back of the CRUD code fragment, you can customize the code template to reduce duplication of labor. Support MySQL and SQLite databases to quickly build project prototypes.
PS: Here recommend a few of the site's format/landscaping/conversion tools to help you organize the messy code, I believe that we can use in future development:
PHP code online format Landscaping tools:
Http://tools.jb51.net/code/phpformat
Online Xml/json Mutual Conversion tool:
Http://tools.jb51.net/code/xmljson
JSON code online Format/beautify/compress/edit/Convert tools:
Http://tools.jb51.net/code/jsoncodeformat
SQL code Online formatting Landscaping tools:
Http://tools.jb51.net/code/sqlcodeformat
More interested in thinkphp related content readers can view the site topics: "thinkphp Introductory Course", "thinkphp Common Methods Summary", "PHP Cookie Usage Summary", "Smarty Template Introductory Course" and "PHP template technology Summary."
I hope this article will help you with the PHP program design based on thinkphp framework.