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 ');
$ L_requestContent = file_getcontents ("php: // input ");
$ L_requestCommand = new RequestCommand ();
$ L_requestCommand-> parseFromString ($ l_requestContent );
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 .....