Try MAMP on Mac

Source: Internet
Author: User


Original article. For more information, see the source!

I recently learned about Apache, Mysql, and php on Mac. Record it here for memo

1 php1.1 php Return Value Test

If the test is successful under MAMP, echo returns the data directly.

1.2 php debugging environment
  • With komodo, the IDE can be used to Debug some items at the breakpoint, but after the machine is installed, it cannot be debugged,

Failed to configure for local php debugging

  • Use emacs to edit the file,
  • In Terminal, let's take a look at the syntax.
  • Debugging content in chrome or through projects
1.3 php parsing protobuff objects
  • Protobuf library dependency

Require_once (PRO_ROOT. '/message/pb_message.php ');

  • Business Logic library dependency

Require_one (PRO_ROOT. '/message_proto/pb_protohbcommand.php ');

  • Read Request data

$ L_requestContent = file_getcontents ("php: // input ");

  • Constructor

$ L_requestCommand = new RequestCommand ();

  • Filling content

$ L_requestCommand-> parseFromString ($ l_requestContent );

  • Resolution Field

Echo ($ l_request-> loginRequest ()-> user_data ()-> user_id ());

2 mysql command in mysql2.1 mamp

Alias mysql = '/Applications/MAMP/Library/bin/mysql'

2.2 mysql Command 2.2.1 Remove this Database

If (mysql_num_rows (mysql_query ("show databases like '". "test_database". "'") = 1 ){

Drop database test_database;

}

2.2.2 Create New Database

Create database test_database;

2.2.3 Create Table .....


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.