In order to realize the program's business logic and Content Performance page separation to improve the development speed, PHP introduced the concept of template engine, PHP template engine inside the most popular can be said to be smarty, smarty
Often meet the site after the customer asked to add a Site Guide page, But the site's index.php has been defined, so have to find a way to skip index.php this page, in addition to set up a home page, in addition to using the Site management Control
Website anti-theft chain image of the meaning of this is not much to say! Specifically, you can refer to this site article: how to use. htaccess anti-theft chain website Pictures, this article is mainly shared under how to use. htaccess only for
Share a PHP filter string function with the following code:
function striphtml ($string) {$pattern =array ("' Si '," '
]*?>.*? ') Si ", " ' ]*?> ' si ', ' ' ([\ r \ n]) [\s]+ ' ", " ' & (quot| #34); ' I ", " ' & (amp| #38); ' I ", "
What if we find out that an IP is often attacking our site, or for other reasons, to deny the IP access to our site? Here's a way to deny an IP access through the. htaccess.
Edit the. htaccess file and enter the following:
Order Allow,denydeny from
A friend who has done PHP development with Smarty should know in the Smarty template whether the Foreach loop is the last one you can use $ Smarty.foreach.name.last to determine whether the cycle is to the last record, in the thinkphp how to judge
Download address (GITHUB.COM/MASTEREXPLODER/PHPTHUMB).Note that this class library has a name called Phpthumb, only the difference in capitalization, so be careful when looking for documents.In the site construction process, the need to deal with
Garbled common is the direct connection to the MySQL database tutorial without setting the code of the Connection query, commonly used is mysql_query (set names gb2312) so most can be solved, the following to see a method to solve
$link =
The original Ecshop, in some products can not find or be deleted, or directly to the dynamic page access, when the parameter is missing or the database can not find matching data, the program processing is pointing to the home page, this is not
Build apache+php development environment, Apache all the way to install, but, download PHP build, configure Apache, PHP, always error "The requested operation has failed! "A few versions of PHP are still not available. Changed php-5.3.28-win32-vc9-x8
Copy CodeThe code is as follows:
Get thumbnail images of video files
function Getvideocover ($file, $time, $name) {
if (empty ($time)) $time = ' 1 ';//default intercept first Second first frame
$strlen = strlen ($file);
$videoCover = substr ($file, 0
When doing FTP data acquisition, need to use a PHP function Ftp_connect, this function is to establish a new FTP connection, if the successful return of a connection identity, failure will return FALSE.
Ftp_connect () opens an FTP connection with
Thinkphp built-in template engine is a self-innovative XML-compiled template engine, below a case to share some thinkphp built-in template engine commonly used template tag usage, including variable output, loop, judgment, comparison, etc., these
Download address (GITHUB.COM/MASTEREXPLODER/PHPTHUMB).
Note that this class library has a name called Phpthumb, only the difference in capitalization, so be careful when looking for documents.
In the site construction process, the need to deal with
In doing a picture preview of the things in the diagram, encountered a problem, is to determine whether the remote file exists (not the same server).
The code is as follows:
Copy CodeThe code is as follows:
Method One
function file_exists ($url)
{
$
After nearly one months of research on the MVC, oneself also through the online has the friend's guidance, has a set of own MVC process and the frame, but feels the limitation or is many, the flexibility aspect still is lacks, but does not know how
Apache the same IP configuration of multiple domain names, do web development should be very familiar with, but still summed up to prevent later forget!
Here's how it's done:
1. Installing the Apache Configuration virtual directory under Windows2003
Open source CMS dedecms since 5.7 version in the background landing page put a lot of small ads bit. Although weaving dream as an open source free CMS, to earn a little advertising fee is understandable, but every time you open the landing page to
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