Queryphp framework released new version automatically generated html added pagination class image processing class solution

Source: Internet
Author: User
Queryphp framework released new version automatically generate html add paging class image processing class currently the latest version of code 0.9.8. google. compqueryphpdownloadslist database paging class use & nbsp; $ pagerC (& quot; pager & quot;); & nbsp; setPager (total, pa queryphp framework released new version automatically generated html added pagination class image processing class
Latest version 0.9.8
Http://code.google.com/p/queryphp/downloads/list

Database paging usage

$ Pager = C ("pager ");
// SetPager (total, pagenum, 'page'); sets the $ _ GET page variable.
// SetPager (total, pagenum );
$ Pager-> setPager (100,10, 'page ');
// You can use $ booktype-> count (); to obtain the total number.
// Read the curdRouter. class. php file in detail.
// To retrieve the navigation html, we need to pass in the url. use: page instead of the above setPager () parameter.
// $ Pager-> getLinks () get the paging array
// $ Pager-> getLinks (5)
/*
* Get the link array
* Returns an array like array (1, 2, 3, 4, 5, 6 ).
* Foreach ($ pager-> getLinks () as $ page)
* Echo url_for ("/model/action/page/"). $ page;
*/

$ Pager-> getBar (url_for ("model/action/page/: page "));
/*
* Retrieve an array with url links
* Key => value method
* Returns an array like array (1 => url, 2 => url, 3 => url, 4 => url ).
* Foreach ($ pager-> getBar (url_for ("model/action/page/: page") as $ key => $ page)
* Echo "". $ key ."";
*/
Print_r ($ pager-> getWholeBar (url_for ("default/index/page/: page ")));

Echo ("page:". $ pager-> offset ().":");


Convert library files to pinyin using Chinese characters
$ Pinyin = C ("zh2pinyin ");
Echo $ pinyin-> T ("can open-source hardware be as popular as open-source software ");
Echo $ pinyin-> T ("can open-source hardware be as popular as open-source software", true); // true indicates removing spaces in the middle
Echo $ pinyin-> T ("can open-source hardware be as popular as open-source software ");


Generate text watermark image

C ("waterimg")-> createWaterPng ("watermark start ");
Under the config directory generated by default
In config, there is a waterfont. TTF font in the water font.



Automatically generate html methods
Framework \ config \ inc. ini. php
/*
* Starting from static website, seo can be optimized
**/
Using configask'html'{}'.html '; // The url ending with kai.html
$ Config ['realhtml '] = "/html"; // enable the super cache Directory. if the html page is automatically generated when no html page is accessed for the first time, the second access is static.
$ Config ['htmlcache'] = array ("class" => "sitehtml", "method" => "realhtml"); // generate html file classes and methods, if this parameter is not set, no html page is generated,

The input parameter is $ content, $ pathinfo;
/*
* Static website ends
**/

Html is not generated when the url address is index. php.

Http://www.app.com/project/html/curd/index/page/2.html
Html is automatically generated when index. php is not available.
The generated html file is in the $ config ['realhtml '] Directory.
If you want to update, delete the html content.

Apache configuration


Order allow, deny
Allow from all
AllowOverride FileInfo

DocumentRoot "D:/work/queryphp"
ServerName "www.app.com"

Decompress the framework to the queryphp directory.


------ Solution --------------------
Continue
Haha...
------ Solution --------------------
GOOD

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.