Example, a PHP get remote picture class. Code:
if (! defined (' BasePath ')) exit (' No direct script access allowed ');
/*
* Remote access to picture class
*
* Requires the curl extension to be turned on
Delete the directory and the included file functions
Note $dir file name Eg:admin/runtime
Delete the directory and the included file functions
function Deldir ($dir) {
Open File Directory
$DH =
The example in this paper describes the method of YII2 controller controllers ' Ajax operation. Share to everyone for your reference, as follows:
Public Function Actionsample () {if (Yii:: $app->request->isajax) { $data = Yii::
1. Abstract classes must be inherited to be used, not directly new
2. Abstract classes can have non-abstract methods
3. Subclasses must implement all abstract methods
4. Abstract class with Java
(Click to go) Abstract class for Java
Creating instance:
$gravatarService = new Np_service_gravatar_profiles ();
Changing response format to XML:
$gravatarService->setresponseformat (New Np_service_gravatar_profiles_responseformat_xml ());
Getting profile
Recently in the study of the function of hair red envelopes, so wrote a red envelope generation algorithm.
Demand of red envelope generation algorithmGenerate all the red envelopes in advance or a request randomly generate a red envelopeSimply put,
This is a php +txt text file made by the online call voting system, without database support can complete the online user survey function, the details are as follows
Online Survey program code Survey.php
You have voted, thank you for
PHP three main api:mysql,mysqli,pdo differences and connections when connecting to MySQL database server
is also a commonly used extension, which of their performance is excellent?
It's all good, but it's better in comparison (
$table = Str_replace ("
Remove HTML Tags
html each row of the table is converted to a CSV format array
//html each row of a table to a CSV format array
!--?
function Get_tr_array ($table) {
echo "dev-lang/php fpm" >>/etc/portage/package.use
Emerge-av dev-lang/php
Copy CodeConfiguration is very simple, my machine version is php5.4, then edit the file/etc/php/fpm-php5.4/php-fpm.conf, modify listen address
Generate a certificate file
Generate a self-signed certificate and place it in the specified location
3650'/CN=odoo.youyun.com/' -nodes -newkey rsa:2048sudosudo mv server.key server.crt /etc/ssl/nginx
Configure Nginx
sudosudo vim
Demo Address: http://www.it-home.orgBlue Demo Address: http://www.feixuege.comUpload the six_portal to the forum root directory.2. Upload \template\ Your template directory \portal\index.html to \template\ your template directory \portal , for
Need to contract several directories
#测试php-FPM Configuration
/usr/local/php/sbin/php-fpm-t
/usr/local/php/sbin/php-fpm-c/usr/local/php/etc/php.ini-y/usr/local/php/etc/php-fpm.conf-t
#启动php-FPM
Previously wrote an article is also about the high-performance PHP picture dynamic cutting scheme, the article uses the Nginx cache and rewrite implementation, of course, coupled with the CDN, the solution has a problem is that the picture is not
Requires PHP code to determine whether the remote URL is valid, remote URL includes remote images, Web pages, video and other elements.First, using PHP to solve the use of the file_get_contents function, but the pros and cons if the URL is
Convert string Open_door to Opendoor, convert ABC_BCD_CDE to ABCBCDCDE
"HTML code"
Convert string Open_door to Opendoor, convert ABC_BCD_CDE to ABCBCDCDE
{title}
This is a {file} file ' s templets
Copy CodePHP Processing: templetest.php
$title = "Test Template";
$file = "Twomax Inter test Templet,author:matrix@
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