The YM framework is produced by one person: AMEN and developed by Annihilation Network Studio.
This framework is a PHP native framework and can be introduced through include or require at will, without directory restrictions.
Routes can be defined via app.use(), and the framework has filtered xss
Template, through template variables, wrapped with {{}}, you can pass the variable value, so that more PHP developers who do not like composer can write projects at will and use them. After cloning it locally, they can directly use any editor to write, according to the framework Just write the rules without any dependencies (of course you still need PHP and web service components to run)
- No composer is required for management, making development more convenient for those who like freedom.
- Route customization, undefined routes will report an error directly
- debug can locate a certain file/class[method]/function/file/line
- Static files do not need to define routes again, just use static file global variables
- Template file, use render or sendFile, you can use template variables, just pass the variables after using php development, support html tags, javascript transfer
- Support params parameters, say goodbye to ugly get parameters (REST_ful style)
- More advantages are waiting for you to discover...
- In response to security, the framework abandons 5.6, and the minimum is 7.0
- If you still want to use 5.6, you need to change some parts: change global define to ordinary assignment, and change the places where these two constants are used to ordinary variables.
- php >=7.0 <8.2
Download the latest framework and replace the old framework as follows:
- /bin directory
- /app.php file
- /index.php file
You can upgrade to the latest version. If an error is reported, please check the version update log and compare the corresponding modifications.
Current documentation version: 0.6
The document version is the same as the latest version number of the framework
The project document defaults to the latest framework content. For example, in the framework you downloaded, if there are no classes/functions described in this document, it means that it is not the latest version.
Subdirectory operation is not supported. For example, if your domain name is hung in: [/www/ym], but the framework is placed in [/www/ym/ym2], and then executed through: http://host/ym2, This is not allowed
0.1: The birth of the framework
0.2:
- Fix routing inaccuracy issue.
- Fixed the problem of static files pointing to local, now pointing to host, automatically determining the protocol
- New anti-theft and anti-illegal introduction functions: static files are injected with anti-theft and anti-introduction functions. The static files are only valid when the page is loaded, and they become invalid after loading.
- Added YM_CLASS method. The new system route cannot be defined
- Newly added query parameters, such as /ww/dd, can obtain ww, dd
0.3:
- Fixed the problem of inaccurate routing when there are get parameters, and added fuzzy routing, such as:
App: use ( ' /admin ' ,'路由路径',false);
- Then directly use other routes such as /admin or /admin/login.
- Delete the static file anti-theft function. This function is found to be useless.
- Introduce static routing optimization to prevent output file type errors
- Remove unnecessary comments that will invalidate static files
- Optimize $request->sendFile() to support static file global variables
- Optimized the error in obtaining routing parameters
0.4:
- Optimize the routing strategy to reach the designated route faster, optimize the fuzzy (not strict) routing algorithm, and not waste server performance
- Determine the file type of template files and optimize the type algorithm of static files.
- Added method requestType in YM_request to return the current user request type: put, get, post, etc.
- Add static file type directory: fonts data. txt or audio files can be placed in data.
- The DEBUG method: error has been optimized to directly locate which method, which class, which function, which file, and which line the error occurred (debug can be switched on:/bin/config/Config.php)
- Change the method name in the YM_request class to be more user-friendly
- body_post->post
- query_get->get
- query->params
- is_get->whetherGet
0.5 | July 22, 2022:
- Solve the problem of static file pointing error when running with a port number
- Optimized database classes, added: multi_query, update_array, insert_array, get_row_all. Optimize sqlite database connection method
- rsa encryption and decryption optimization, solve the key length problem, and automatically obtain the key length
0.6 | September 11, 2022:
- Adapted to PHP8.0 and PHP8.1, the others have not been tested yet
- Solve the parameter purification error BUG in PHP7.4 and above
- To add custom IP, please check the document usage YM_request->ipV2(int $type, string $zdy=NULL)
- Add custom error page YM_request->statusPage(int $response_code,string $path,array $options=[])
- Added YM_request->getLog() to obtain the current log
- Modify the send_mail method of the YM_Class class and add the parameter: $Secure. If specified, specify this protocol to connect to the mailbox, otherwise it will be automatically determined based on the port. If the sending fails, the page will no longer be output directly, but an error message will be returned. If the message is successful, an error message will be returned.
- The framework has added a new waf firewall. You can choose to enable it or not. Just comment it out. Those who understand the waf rules can write it by themselves. Those who don't understand can also keep the default. This can make your web program more secure.
Other versions | : For more information, please see the project document: http://ym-php.rkru.cn/ #Project document link http://ym-php.rkru.cn/