Merge _00 basic PHP (6days) jobs

Source: Internet
Author: User
Tags constant definition

?

    1. The code is basically in the notes. More notes.
    2. (Apache) configures the Apache environment so that it can access a webpage using the following address: http://localhost:808/, Web page: This is the home page of the local 808 port
    3. (Apache) configures the Apache environment so that it can access a webpage using the following address: http://www.wodezhuye.com, Web page: This is my homepage
    4. (Apache) Configure Apache to use the following addresses to access one webpage: http://localhost/aaa/page1.html, http://localhost/bbb/page1.php, note "AAA" and " BBB "is not a directory, but a virtual directory (alias directory). Web content customization.

?

  1. (Basic) write down the basic points of PHP syntax (with HTML separators, statement lines, case, comment, variable declaration form, variable type, constant definition form.) )
  2. (base, output) uses 3 variables, each using 3 string representations, and then outputting them to the Web page, outputting the same content, and each row. The output is text with the following yellow background:
    The teacher said, "You cannot use a newline character (that is, \ n) for the purpose of wrapping on a Web page, instead you should use the <BR/> label."
    -note that both the single and double quotation marks are in English.
  3. (Assignment value/reference pass value) read the program, write the result:
    1. $a = 1; $b = $a; $a = $b + +; $b = $a + +; echo $a, ",", $b;
    2. $a = 1; $b = $a; $b + +; echo $a, ",", $b;
    3. $a = 1; $b = & $a; $b + +; echo $a, ",", $b;
  4. (expression) known as any two positive integers (a, b), as the right triangle of the right-angled edge length, to seek the hypotenuse length. (Note: POW () function is used for power operation)
  5. A cylinder is known to have a diameter of D and a height of h, and the surface area and volume of the cylinder are obtained.
  6. (expression, operator) known as $ A, $b, $c, $d values (note and JS comparison results) are as follows:
    $a = 1; $b = 2.2; $c = 3.3;???????????? $d = $a + $b + $c;
    $a = 1; $b = 2.2; $c = "3.3";???????? $d = $a + $b + $c;
    $a = 1; $b = "2.2"; $c = 3.3;???????? $d = $a + $b + $c;
    $a = "1"; $b = 2.2; $c = 3.3;???????? $d = $a + $b + $c;
    $a = "1"; $b = 2.2; $c = 3.3;???????? $d = $a + ($b + $c);
    $a = "1"; $b = 2.2; $c = 3.3;???????? $d = ($a + $b) + $c;
    In the calculation expression above $d, the plus sign (+) is replaced by a minus sign (-), what is the result? Please check it yourself.
  7. (operator) Bitwise operation: Calculates the result of 100-shift-right 2-bit, and the result of moving the 3-bit left.
  8. (operator) Read program write result:
    $i = 10; $j = $i + +; Echo ($i. "," . $J);
    $i = 10; $j = + + $i; Echo ($i. "," . $J);
    $i = 10; $j = $i + +; $i = $j + +; Echo ($i. "," . $J);
    $i = 10; $j = + + $i; $i =++ $j; Echo ($i. "," . $J);
  9. (branch structure) defines a variable that represents a "fraction" and assigns it a value, outputting the following text in the page, depending on the height of the score:
    Excellent (>=90), Good (>=80), Medium (>=70), pass (>=60), fail (other case).
    --Use the IF and switch two methods to do the implementation. (Note: Floor () function indicates rounding down)
  10. (Process: Branch and loop) outputs all leap years from 2000 (inclusive) to 3000 (inclusive).
  11. (loop) Use an asterisk to output the case (the maximum number of asterisks is determined by the initial variable n, n=4 in the illustration):
    ****
    ***
    **
    *
    **
    ***
    ****
  12. (loop) Output 9x9 multiplication table.
  13. (cycle, analysis) the thickness of a sheet of paper is 0.01 mm, then the paper is folded 30 times after it is much thicker (said to exceed the height of Mt. Everest). In turn, a piece of paper folded several times, more than 1 meters thick?
  14. (cyclic, logical analysis) all primes between output 2-200 (primes are the number that can only be divisible by 1 and itself).
  15. (circular, simple operation) calculates the sum of squares of all numbers from 1 to 100 using 3 loop statements.
  16. Write a program that outputs 1 to 100 of these numbers. However, when the number is a multiple of 3, the output "three" substitution number, for a multiple of 5 with "five" instead of a multiple of 3 and 5 multiples output "35".
  17. (Loop, while, logic analysis) Suppose someone has 100,000 cash. A fee is required for each intersection. The payment rule is that when he has cash greater than 50,000 each time it needs to pay 5% if cash is less than or equal to 50,000 per 5,000. Please write a program to calculate how many times this person can pass this intersection.
  18. (cycle, logic analysis) There are three kinds of red, white, black ball several, including red, white ball a total of 25, white, black ball a total of 31, red, black ball a total of 28, beg this three kinds of ball each how many?
  19. Rooster 5 Text Money 1, hen 3 text Money 1 only, chicken 1 money Buy 3, now with 100 money altogether bought 100 chickens, Q: In these 100 chickens, rooster, hen and chicken how many?
  20. (Loop, logic analysis) Enter a positive integer less than 10 N (for example, n=4) and output as a case:

    1111

    222

    33

    4

?

?

See more code and PPT

    1. function, logic) defines a function that determines whether the given number of years is a leap year (that is, a bool value is returned).
    2. (function) defines a function that calculates the hypotenuse corresponding to any two right-angled edges.
    3. (array) define an array and enter 6 values, representing the group's respective age, and the average age of the group's classmates.
    4. (array) Define an array, enter 7 arbitrary numeric values, find the maximum and minimum values in the array, and what are the respective subscripts? Where do you want to swap the minimum value for the maximum value?
    5. (array) Define an array, enter 8 arbitrary values, find the number of numbers greater than the average in the array, and less than the average number.
    6. (array) Define an array, enter 9 arbitrary integers, and find all the odd averages in the array.
    7. (character) use Echo to output the following text on the Web page (note the newline):







    8. (character) Gets the file name and its suffix in a long file path (such as "E:\luodh\itcast\class\php120912\js\day2\abc.html") (the result should be "ABC" and "HTML").
    9. (Math) to find Pi Pi 5 times, and rounded to retain 2 decimal places.
    10. (Math) writes a program that requires 6 double-digit integers to be displayed on the page each time the page is refreshed.
    11. (Math) to write a function with a parameter n, on the page output 1~n (n>1) all can be simultaneously divisible by 3, 5 even, and requires only 6 per line (that is, more than 6 after the line to be wrapped and then output).
    12. (Loop, logic) to find out which 3-digit integers meet the criteria: the number of the numbers on each digit of the number of cubic meters and equal to the number itself (this number is called Narcissus number).
    13. (time) Output the current date, time, and Week in PHP.
    14. (time) Use PHP to calculate how many days you have survived from birth to the present?

?

    1. Read more notes and PPT, especially PPT
    2. (database) Creates a database in command-line mode and creates a table in it that contains fields of type int, float, char, varchar, and time, and a field that is "autogrow" and a primary key. Insert a piece of data into the table
    3. (database) Creates a database in command-line mode (set to the UTF8 character set) and creates a "user table" in it that contains the fields of ID, user name, e-mail, gender, age, date of birth, birthplace, and the field ID is "autogrow" and the primary key. The reasonable type and length of the field are designed. You then use the phpMyAdmin tool to insert a piece of data manually, and then use the SQL statement in command-line mode to insert another piece of data. All data is displayed at the end. (Note the test data as much as possible in Chinese)
    4. Like the following table structure and data (where the ID is the self-growing primary key):

      Write the following SQL statement (Note that the SQL statements are written to accomplish these tasks rather than through the interface tools.) Note that the space in the table above should be interpreted as an empty string):
      1. Create the table
      2. Insert the data in the graph, as well as the following data: Title is "TTT", Content for "CCC", nickname for "nnn", email "[email protected]", Pubtime for the current time (current time with Now () to indicate).
      3. Find all data with an ID of less than 5.
      4. Find out what time is on October 11, 2012 12:13 14 seconds before data
      5. Find the title and contents of the empty nickname (that is, an empty string)
      6. Find the content or nickname or email an ID value for an empty string
      7. Find all information that has an ID greater than 3 and a nickname is an empty string

?

?

?

Merging _00 basic PHP (6days) Jobs

Related Article

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.