PHP extension-php Tutorial

Source: Internet
Author: User
PHP Extension problems now write PHP extension dll in windows, how to call other already written dll in extension dll, such as extension dll call php_mysql.dll and win32 dll


Reply to discussion (solution)

Do not make useless changes to language B code.
Do not use the-language code to directly call the B-language code library. this is complicated and error-prone.
You only need to redirect the input and output of the language A and B code to A text file, or modify the language A and B code to make it input and output through the text file.
It is easy to coordinate the work between A and B languages.
For example:
A writes the request data to file a.txt, and changes it to aa.txt.
Bytes
When the adiscovers that bb.txtexists, read its content and then delete bb.txt.
A can be replaced with any development language or development environment, and B can be replaced with any development language or development environment different from.
Unless A or B does not support determining whether A file exists, reading/writing, and renaming A file.
But who can cite a development language or development environment that does not support determining whether a file exists, reading/writing, or renaming a file?
You can place temporary files on RamDisk to improve efficiency and reduce disk wear.
If the data structure is complex, for the format of text files, see json or xml

The communication methods between processes such as sharing temporary text files have many advantages over other methods. The following lists only what I can think of now:
· Loose coupling between processes
· Processes can be on the same machine, cross-machine, cross-operating system, cross-hardware platform, or even cross-country.
· Easy debugging and monitoring. you only need to have a third party or manually view the temporary text file.
· Online switch service is convenient. you only need to delete or create the temporary text file.
· Facilitate Distributed and load balancing.
· Facilitates the provision of services in queue mode, and it is almost impossible to have full queues (unless the hard disk space is full)
·......

"Cross-language, cross-machine, cross-operating system, cross-hardware platform, cross-country, cross *. *" is boundless,
Back to "using shared plain text files for information exchange!

I don't know what #1 is talking about!

There are many php extension frameworks on the internet. you can download the source code (such as phalcon)

I don't know what #1 is talking about!

There are many php extension frameworks on the internet. you can download the source code (such as phalcon)


I am not familiar with PHP

It doesn't matter much if you are familiar with php?
Since you are writing php extensions, you must be familiar with C ++, so how do you call them?

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.