Php code for adding text to the image you post at any time

Header ("Content-type: image/jpeg ");Function makethumb ($ srcFile, $ text, $ size = 12, $ R = 0, $ G = 0, $ B = 0 ){If (! $ Text ){$ Text = ''welcome to imbbs.cn '';$ Size = 20;$ R = 255;}$ Data = GetImageSize ($ srcFile, & $ info );Switch ($ data [

Data operation and paging used by phpfans message board

Copy codeThe Code is as follows: class mysql {Function connect ($ dbhost, $ dbuser, $ dbpw, $ dbname = '', $ dbcharset = ''){If (! @ Mysql_connect ($ dbhost, $ dbuser, $ dbpw )){$ This-> show ('can not connect to MySQL Server ');}If ($ dbname ){$

Incomplete automatic paging Solution

Test code $ Content = $ _ POST ["content"];// Echo $ content;$ Ft = array ("", " ");// Echo count ($ ft );$ Html = "abaaaaaaa cssssssssssssssssssd efdddddddddddddddddd ";Preg_match_all ("| () | U", $ html, $ out, PREG_PATTERN_ORDER );While (list ($

Differences between session_unset and session_destroy

Session_unset ()Releases all the $ _ SESSION variables that have been created in the memory, but does not delete the session file or release the corresponding sessionid.Session_destroy ()Delete the session file corresponding to the current user and

Simply filter HTML tags in strings

Function deleteHtml ($ scr){$ L = strlen ($ scr ); For ($ I = 0; $ I {If (substr ($ scr, $ I, 1) = "{// Current location$ Ii = $ I; // Stop the loop when $ I is longer than the character LengthWhile (substr ($ scr, $ I, 1 )! = ">" & $ I $ I ++; //

Use php to create simple paging (read records from the database)

New to PHP, I always wanted to forget all pages. I was lucky to be reminded today that I searched the internet. Some of them cannot be read. Finally, find a simple one. The general idea is:   1. Set the maximum number of records to be displayed on

LotusPhp notes: How to Use the Logger component

Today, I was very busy. I wanted to write more content. There is no way to do it now. I have to pick up a simple component and write it down. I will introduce the components in the following chapters. The use of LtLogger is relatively simple. The

Main. php

/*** Site Main Page** @ Author Avenger * @ Version $ Id 18:06:20 $*/Require_once 'header. inc. php ';Tpl_load ("index.html", '', 'keep ');// Get u language$ G_lang = explode (',', $ _ SERVER ['HTTP _ ACCEPT_LANGUAGE ']);Switch ($ G_lang [0]) {Case

In-depth use of PHP Data Cache

Copy codeThe Code is as follows:// Http://www.jb51.net/article/23093.htmFunction set_cache ($ name, $ value ){// Set relative or absolute directories. Do not add "/" at the end "/"$ Cache_dir = "./cache ";// Set the extension$ Cache_extension = ".

Part II: install and configure PHP

After Apache is installed, you can finally get started with PHP. Let's get started. First, decompress the downloaded php-5.2.0-win32.zip file. If you like the directory, I will decompress it to D: \ php5 for convenience. If you want to change the

IIS + PHP + MySQL + Zend configuration (video tutorial)

Haha, haipi. I am thinking about how to write the IIS + PHP configuration tutorial. I accidentally found a video tutorial on the Internet, which really saves a lot of time, it's convenient for me. You can rest assured that the virus has been

The role and usage of the get_headers function in php

Get_headers () is a PHP system-level function that returns an array containing the header sent by the server to respond to an HTTP request. If it fails, FALSE is returned and an error message at the E_WARNING level is sent (it can be used to

Summary of some of the most easily forgotten knowledge points in PHP

1. Define constants:Copy codeThe Code is as follows: // 1Define ("TAX_RATE", 0.08 ); Echo TAX_RATE; // output 0.08 // 2 (PHP 5.3)Const TAX_RATE2 = 0.01; Echo '--'. TAX_RATE2; // output 0.01?>2. Difference Between require and require_once: If a file

Zend MVC mechanism usage analysis (1)

CodeCopy codeThe Code is as follows:$ Front = Zend_Controller_Front: getInstance ();Zend_Layout: startMvc (array ('layoutpath' => USVN_LAYOUTS_DIR ));$ Front-> setRequest (new USVN_Controller_Request_Http ());$ Front-> throwExceptions (true );$

Php Watermarking Techniques for uploading multiple images

Copy codeThe Code is as follows:Function imageWaterMark ($ groundImage, $ waterPos = 0, $ waterImage = "", $ waterText = "", $ textFont = 5, $ textColor = "# FF0000 "){$ IsWaterImage = FALSE;$ FormatMsg = "this file format is not supported currently.

Php's ideas and code for determining whether the terminal is a mobile phone or a computer accessing the website

Code 1:Copy codeThe Code is as follows:Function check_wap (){If (isset ($ _ SERVER ['HTTP _ VIA ']) return true;If (isset ($ _ SERVER ['HTTP _ X_NOKIA_CONNECTION_MODE ']) return true;If (isset ($ _ SERVER ['HTTP _ X_UP_CALLING_LINE_ID ']) return

PHP array and String Conversion Implementation Method

Copy codeThe Code is as follows:$ Array = explode (separator, $ string );$ String = implode (glue, $ array );The key to using and understanding these two functions is the relationship between the separator and glue. When an array is converted into a

Tips for PHP recursive call

In the actual PHP encoding, PHP recursive calls are encountered when we need to implement the multi-element array replacement function. So what is the specific usage? The following is a code example to illustrate how to implement this

Use line breaks and (\ n or \ r \ n and br) Applications in php code

Code:Copy codeThe Code is as follows:Echo 'Hello ';Echo 'World! ';?> Output:HellloWorld!Code B:Copy codeThe Code is as follows:Echo 'Hello \ n'; // \ n for unix systems; \ r \ n for windows systemsEcho 'World! ';?> Output:Helloworld!Analysis: The

Some related experiences and precautions for connecting php to mssql

To connect PHP to MSSQL, the system needs to install MSSQL and PHP. In the configuration of PHP. ini; Extension = php_mssql.dll; remove1. Connect to MSSQLCopy codeThe Code is as follows:$ Conn = mssql_connect ("Instance name or server IP Address",

Total Pages: 12780 1 .... 12452 12453 12454 12455 12456 .... 12780 Go to: GO

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.