After learning the C language, I found that he could not do anything? Do you think learning C is helpful to PHP, or do you know that he cannot do anything after learning C language? Do you think learning C is helpful to PHP, or you can do something nice or interesting?
Reply content:
After learning the C language, I found that he could not do anything? Do you think learning C is helpful to PHP, or you can do something nice or interesting?
First, you can't do anything about the C language, but your application is incorrect. Second, for php, the C language can be used to expand it.
Let's take a look at this and use C/C ++ to expand your PHP
Since you are familiar with PHP, you should first play with CGI when you first touch the C language. It is actually very easy to play with CGI. Rename the executable file compiled belowtest.cgi
Put it under the bin-cgi directory of the configured Apache, and then accesshttp://localhost/bin-cgi/test.cgi
Good:
// cflags: -o /var/www/cgi-bin/test.cgi#include
#include
#include
int main(){ printf("Content-Type: text/plain\n\n"); char *qs = getenv("QUERY_STRING"); if(!qs) exit(-1); char* equ = strchr(qs, '='); if(equ) *(equ++) = '\0'; if(strcmp(qs, "name")) printf("Parameters incorrect."); else printf("Hello Mr./Mrs. %s", equ); return 0;}
Of course, optical c cannot do anything. You can write a console calculator at most.
C must be combined with the system api to do something. However, in the end, all these credits are from the system api, which has little to do with c.
Conclusion: You are right. You can't do anything after learning c.
You can write a database. Of course, this should be combined with the system API
After learning C, you will be able to understand the underlying layer of PHP, and better understand the principles of some things that are only known for use.
Why can't I do anything in C language? On the other hand, What can't I do with C language?
John Carma's game engine is pure C.
What can I do with C language? It's not important to learn programming. C helps you fully understand the memory ~ Thoroughly learn how to think about problems from a procedural perspective ~
This is the most important thing.
You should ask: how can we use c to do things?
Php is written in c. What do you say?
Use the appropriate language to do the right thing
C language is particularly suitable for writing operating systems and other places with High Performance Requirements
These places require that the C language runtime be as small as possible, so the C language can only use the standard library.
However, the api exported by the operating system is an excuse for C language.
Buy the first volume of advanced programming for unix networks or advanced programming for unix environments.