A PHP programmer face Test (basic type)

A relatively basic PHP programmer interview Questions, test the comparative basis, but there are many details of things, if the foundation is not strong, it is difficult to pass. If you need a friend, refer to it.1. In PHP, the name of the current

PHP Programmer face Test (classic summary)

function Gbsubstr ($string, $start, $length) { if (strlen ($string) > $length) { $str =null; $len = $start + $length; for ($i = $start; $i if (Ord (substr ($string, $i, 1)) >0xa0) { $str. =substr ($string, $

PHP Picture Counter Code (enhanced version)

Session_Start (); $dir = ' cookie.txt '; $file = fopen ($dir, ' R '); $content = fgets ($file); Fclose ($file); if (Empty ($_session[' viewer '])) { $content + +; $newopen = fopen ($dir, ' w '); Fwrite

PHP Programmer interview Several questions (PHP and MySQL section)

$m =$_get[' m ']; $user =$_get[' user ']; $pass =$_get[' pass '; $include ($m. " Do/php "); $sql = "SELECT count (*) as B from user where Username= '". $user. "' and password= ' ". $pass." '; $r =mysql_query ($sql);

PHP Programmer face Test (classic summary, MySQL-based)

mysql_query ("BEGIN"); mysql_query ("INSERT into CustomerInfo (name) VALUES (' $name 1 ')"; mysql_query ("Select * from ' OrderInfo ' where customerid=". $id "); mysql_query ("COMMIT"); Copy Code5), lock table,

PHP file Programming (iii)-Two ways to write files

/** * PHP file programming to write files * Edit bbs.it-home.org */ Write a file $file _path= "Text.txt"; if (!file_exists ($file _path)) { echo "file does not exist"; Exit (); } "

PHP read-write file generated HTML code example

Generate HTML $countfile = "template.html"; $num =file_get_contents ($countfile); Echo $num; $num =str_replace ("|*|*| Page_title|*|*| "," MyHome ", $num); $path = "template.html"; $handle =fopen ($path, "w");

PHP uses cookies to count the number of visitors logged in the code example

$_cookie["Counter"]? ($c =$_cookie["Counter"]+1):($c =1); Setcookie ("Counter", $c, Time () +60); echo " Welcome to your first". "". $c. " Second access cookie"; by bbs.it-home.org ?> Copy CodeHere is a code

Examples of implementation code for PHP timed tasks

PHP scripts can continue to execute even if the client disconnects (such as turning off the browser). Ignore_user_abort (); Execution time is unlimited, php default execution time is 30 seconds, through Set_time_limit (0) can allow the

About PHP to turn on zlib gzip compression configuration method

Zlib.output_compression = Off ; zlib.output_compression_level = 1 Copy CodeModified to: Zlib.output_compression = On Zlib.output_compression_level = 6 Copy Codewherein, Zlib.output_compression_level = 6

Introduction to how PHP exports Excel and solves garbled problems

Header ("Content-type:application/vnd.ms-excel"); Header ("Content-disposition:attachment;filename=export_data.xls"); echo "Name". " \ t "; echo "Complex". " \ t "; echo "blog". " \ t "; echo "\ n"; echo

PHP three reliable ways to turn on gzip compression

output_buffering = Off Copy Code3,php.ini for ; Output_handler = Ob_gzhandler Zlib.output_compression = Off ; zlib.output_compression_level = 1 Copy Code4,apache added as

Cool News PHP programmer face test-written part

This article introduces, is said to be cool news of the PHP Programmer interview questions, here to find the Notes section, share, for your reference. Featured: PHP Face questions and Answers1, there are three PHP files in the same directory, the

A copy of the PHP question-it's said to be a big company.

$arr 1 = Array ( ' 0 ' = = Array (' FID ' = 1, ' tid ' = 1, ' name ' = ' Name1 '), ' 1 ' = = Array (' FID ' = 1, ' tid ' = 2, ' name ' = ' Name2 '), ' 2 ' = = Array (' FID ' = 1, ' tid ' = 5, ' name ' = ' Name3 '), ' 3 ' =

Teach you how to open PHP's error_log log

This article introduces, PHP open Error_log log method, have the need for friends, refer to it.In PHP programming, for some access to the PHP page without obvious error hints, you can use Error_log to make further judgments. But for a variety of

Simple application of Cookies in PHP (log in status)

setcookie (' v1[name] ', ' hey '); Setcookie (' v2[age] ', ' "); unserialize (($_cookie["name"]);//actually set up two COOKIE variables. copy code 2,cookie The time it takes to log the login status. if

How PHP prevents constants from being repeatedly defined

Prevent constants from repeating definitions, borrowing from Yii Defined (' Yii_debug ') or define (' Yii_debug ', true); Defined (' Yii_trace_level ') or define (' Yii_trace_level ', 3); Edit bbs.it-home.org ?> Copy

Examples of ways to zoom in and out of a PHP picture

/** * Image magnification and zoom * @resizeimage * @param $srcfile source file size * @param $mySize the dimensions to convert * Edit bbs.it-home.org * at 2013/6/7 */ function Resizeimage ($srcfile, $mySize) {

Use session in PHP to determine whether the user is logged in and permissions

User name: Password Copy Code2. PHP Code for validation Session_Start (); $_session["user"]=$_post[user]; $_session["password"]=$_post[pwd];

Discussion on the method of session writing database in PHP

CREATE DATABASE ' Session '; Copy CodeTo create a table structure: CREATE TABLE ' session ' (ID char (+) not NULL, ' user ' char (+), data char (+), parmiry by (' id ')); Copy CodeSave the session file

Total Pages: 5208 1 .... 4271 4272 4273 4274 4275 .... 5208 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.