PHP Study first day-industrious rich

Source: Internet
Author: User

The so-called "industrious rich", is very scientific basis, and is through my hands-on practice.

The whole day has changed since Bishi suddenly turned into a development project. First sister to my ticket was forcibly canceled, and then a senior brother "* * * * * * * * * * * * * * * * * * * is my 1/2 of labor, I can only under the silent feeling that the original water so deep, obviously this conclusion is in my day after study only to arrive.

That's what the crap is. Because I am the web of small white, first learned the HTML language, took two hours. It is in the http://www.w3school.com.cn/index.html study, to this website great praise. After learning HTML, brother gave the first task-the Environment (PHPSTORM+WAMP+GIT). Of course, there are other things, such as getting me familiar with git operations, and figuring out what the Web terminology is doing with little white. Phpstorm is an IDE that encodes PHP very well. Wamp is an integrated development environment, or windows+apache+mysql+php. And Git is a distributed management tool. With the environment is not difficult, thanks to the next brother let me not match lamp. When installing Wamp, an error occurred while installing the running environment, saying that a DLL does not exist. For this kind of run-time library problem, I have to take some of the common Microsoft Runtime collection is installed at once, it is resolved. Because the system was only last night to reload, installed Win10, as for the reason, can only say I smoked, big night One o'clock to install the system ...

After the environment was installed, brother gave the second task---build and deploy the server. It sounds tall, and when you really do it, it's a simple little step. The server is directly understood as Wamp under the WWW directory bar.

  

Just point the address to 127.0.0.0, which is our localhost. We will later write the PHP and so on this page renders.

and deployment is a little cumbersome.

The so-called deployment, which is to establish the IDE, server and browser mapping. The server and browser are mapped in the previous step, which is localhost. We now need to map the IDE's current project directory to the Wamp www directory.

Then:

The mapping is complete.

Here, you can see the friendly interface of the localhost display.

I am using the thinkphp framework, how it used me in the first direct mistake, fortunately, my brother gave me a demonstration, thanks! Because the IDE applies the thinkphp schema, it can be manipulated in the IDE by copying the contents of the thinkphp package into the IDE's engineering directory.

The task is complete. Now seems to be simply deadly, and the front of the operation, a variety of Baidu search information, dry stare at the interface speechless ...

Brother's third task is to modify the LocalHost interface and link and manipulate the database. This is my completion part of the content, senior to an hour, I still spend a night to do it, and now the database has not been engaged, I intend to first PHP basic Grammar mastery, at least two down to strike.

I noticed that the content of the LocalHost interface is controlled by the portal file index.php, its content is not many, it means two points, one is the interface content is in the thinkphp/thinkphp.php, the interface structure after I find it is in the controller PHP file. I made a simple change to it and changed the localhost interface directly.

I also found a problem. I want to learn PHP syntax, I found w3school on the HTML platform can be programmed to show the effect, and PHP can only look at the example, can not be programmed directly to see the effect after interpretation. I helpless for a moment. But I think of the IDE later. I changed the portal file index.php thinkphp/thinkphp.php to a php file I wrote myself, and the content I wrote in that PHP could be run directly on localhost. Simple is not difficult to praise. (I am so stupid, or we all know this method, I do not know, even phpstorm will not use, also dare not ask senior, he is very busy. )

Finally summed up a sentence: Today is very beautiful!

On the question, said the industrious rich, is: ya, a day staring at the computer, shining white screen flash blind my * eyes, the night just remembered, I can change the background color ah ... I want to curse, now just think, my poor eyes ... This background color method: File ~ Settings ~ appearance & Behavior ~ appearance ~ Theme to Darcula is a black background.

Oh, yes.

Finally, leave a PHP code to end it:

<? PHP $cars=array("Volvo", "BMW", "Toyota"); $arrlength=count($cars);  for ($x= 0; $x<$arrlength; $x+ +)    {echo$cars[$x]    ; Echo "<br>";}? >

Effect:

Volvo
BMW
Toyota

PHP Study first day-industrious rich

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.