Simple learning of major php problems _ PHP Tutorial

Source: Internet
Author: User
Simple learning of the main problems encountered by php. So far, the first php website is almost bright. the completion of all the functions in the background at noon means that other websites can be used in the future, so you don't have to spend too much time writing, so far, the first php website is almost bright. the completion of all the functions in the background at noon means that other websites can be used in the future, so you don't have to spend too much time writing, now I am writing and learning the main problems I encountered this month.

Question 1: environment matching

Of course, the most typical php combination is LAMP (Linux + Apache + MySQL + PHP). However, I have no conditions or energy to get Linux, so I replaced Linux with Windows 2003 and used it for debugging, it is not a server, so performance is not required.

In itself, my machine is running ASP and in the Win2003 + IIS + Framework environment. net, and jdk + tomcat + oracle can run jsp. it is difficult to install apache and mysql without disrupting these environments ..

So I gave up the jsp environment, used ghost to back up the asp environment, deleted IIS, and re-installed the PHP environment. the environment was still quite good, you can easily find the tutorial on Baidu and install Apache + PHP + MySQL + PHPMyAdmin without installing Zend. let's talk about it later, I have not studied how different paths run on different ports for multiple websites. I don't need to worry about it. now port 80 is running. after the environment has been debugged, a ghost is backed up, the php environment was successfully set up.

Problem 2: Empty page lines caused by BOM marking of UTF-8 encoded files

This problem was previously encountered when I was learning xhtml + css. at that time, it was caused by the addition of code before the document declaration type or the absence of writing the document declaration type xhtml1.0 but the w3c standard for page creation, at first, I thought it was a problem that I wrote require in front of the document Declaration. later I found it was not that simple after repeated debugging. then I searched for a lot of questions about require that caused empty lines, one cow mentioned that we should remove the UTF-8 BOM from dreamweaver by pressing ctrl + j. at that time, we didn't know what BOM was. if we just removed it, we did solve the problem, this is a pass, but there is still a UTF-8 problem in the future. it is also related to this.

Question 3: The checkbox value in php

This is the only inconvenience I found in php. Unlike asp, all checkbox values with the same name are saved into a set. php can only get the last checkbox value in the same name, it is inconvenient to query multiple data where in (aa, bb, cc, dd). It can only be implemented using js + one hidden input method. although it is a little troublesome, it is not a big problem, it is easy to solve the problem. the only way to solve the problem is to check the Internet!

Question 4: How to transfer the Access library to MySQL

After all, the database has been designed, and it is very troublesome to create a table again in PHPMyAdmin. simply find a software to directly transfer the table to the database. it is not bad that I can find all the useful software, but the entire English interface, I did not remember the name. I will go to the company tomorrow and try again. The library is easy to turn around, but my hands are cheap, I can see that the data folder in MySQL has the same name as the folder in my database. I thought there was no need to create a database with this folder and I deleted all the useless files at the moment, the problem is that PHPMyAdmin cannot be connected to the database. this is a good solution. I re-installed MySQL to solve the problem, but I did not back up the database and switched back to the ASP environment. when I got back, MySQL had a major problem, reinstallation is useless. after hundreds of times of searching, the cool csdn gave the answer "libmysql. dll and php5ts. dll passed to system32 to solve the problem.

Question 5: NTFS permission issues.

This problem also exists in ASP, but I didn't think much about it in the PHP environment, so I spent a whole morning and found this problem on a friend's server, the day before, I met a friend who had encountered a php website construction problem. then I installed a pack, saying that I have a lot of php resources and I only learned 2 weeks. hahaha, the next day, let's solve the problem for someone else. I can't leave it alone when I blow it out. when I connect to the server, I can't continue to install phpcms, the key to Baidu's previous search is the NTFS permission. this is a good solution. you can add an Internet guest to solve this problem. it is estimated that you will encounter this problem in the future, so it's better to get started early than to get started later. you need to know what's going on!

Question 6: how to read and write Cookies.

This problem should not be a big problem, but it was easy to solve it the next day when I got off work. at the beginning, I certainly did not know much about the statements, I thought that $ _ COOKIE ["xxx"] can be both read and written. when I used it here, I found the correct path. the answer to "php cookies writing" is displayed on the Internet, setcookie. it's really easy.
  • 2 pages in total:
  • Previous Page
  • 1
  • 2
  • Next page

Success ,...

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: 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.