Recently because of the need to call the network disk interface to upload files, I used the CURL library, of course, before using CURL library must be enabled in PHP CURL settings
You can get curl information by using the Php_info () function, and if you don't see curl information, you need to set up PHP and open the library. Under Windows platform, you need to change the settings of the php.ini file, find the Php_curl.dll, and cancel the preceding
parent domain
var mysrc = "http://a. Target URL. com:9000/myiframe.html";
document.domain = "Destination URL. com"; Critical code to elevate the domain to the root domain
$ ("Body"). Append ('
HTML code in IFRAME
Attention:
Only if the IFRAME is elevated to the root domain to communicate with the parent window, the ear document.domain instruction can only elevate the current domain to the current root domain, which is why the local hosts file must be modified, wh
first, the use of $httpWe can use the built-in
$http ServicesCommunicate directly with the outside.
The $http service simply encapsulates the native XMLHttpRequest object of the browser. $http Service is
only one parameter can be acceptedfunction, this argument is an object,
contains the configuration content used to generate the HTTP request。
This function returns a Promise object with success and error two methods.
The most basic usage scenarios for these two methods are as follows:
$http ({
When I first started using MongoDB, there was a strange phenomenon:Create a new collection in MongoDB: Zhuanlan This collection, add a few data to the collection, and then use Express to get the database dataGet column Information Router.get ('/api/zhuanlan/list ', (req,res) =>{ models.zhuanlans.find ((err,data) =>{
Write API interface, summed up, but this splicing URL of the way, do not know whether it can be used as an API interface to obtain dataFirst add such a configuration to Web. xmlThen fill in the code with the method1 PackageCom.test.servlet;2 Importjava.io.IOException;3 ImportJava.io.PrintWriter;4 5 Importjavax.servlet.http.*;6 7 Public classTestaextendsHttpServlet {8 @Override9 Public voiddoget (http
Background: I call the API with my colleagues to do data processing and return the processing results
Interaction: I pass a picture message over to him over there. Returns a JSON object that identifies the result of the image.
Method: Use PHP's own curl function
Details:
Opening extended service: Open php.ini file, front of "; Extension=php_curl.dll"; Remove and restart Apache
Two. Implementation code: $fil
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.