PHP code for displaying images by page

Source: Internet
Author: User
Find a PHP code to display images by page. use PHP to display images in folders by page .. How to write the code .. I have been searching for the Internet for a long time and cannot use it. ------ solution -------------------- reference: Amen .. You can help me to save your image path to the database. It is much easier to retrieve data from the database by page. ------ Solution ---------------------- $ imgs & nbs: Find a PHP code to display images on pages
Use PHP to display the images in the folder by page .. How to write the code .. I can't find it online for a long time.
------ Solution ----------------------
Reference:
Amen .. Please help me.
It is wise to store your image path in the database. It is much easier to retrieve data from the database by page.
------ Solution ----------------------
$ Imgs = array_chunk (glob ('images/*. {gif, GIF, jpg, JPG, png, PNG} ', GLOB_BRACE), 8 );

Then bring $ imgs into the paging class you found.
------ Solution ----------------------
Reference:
Reference:
If there are not many images, you can directly put the image path into a variable or text file. in js, you can use ajax or go to the image path to be displayed on each page, and then the js operation is performed.

Big Brother, I don't know much about PHP. I need to do JS .. I will crash.


You won't get rid of the urine database after wearing it...

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.