1. Prepare a standard crontab file./crontab
Copy CodeThe code is as follows:
# m H Dom Mon Dow command
* * * * * date >/tmp/cron.date.run
2. Crontab-e this cron.php script into the system cron
Copy the Code code as follows:* * * * * */usr/bin/php
Continue with the previous article "The main process of Sina Weibo OAuth authentication and storage", and now we use it to publish Weibo.
We have saved the Oauth_token and Oauth_secret of user Sina Weibo to
$_session[' Oauth_token ']= $result ['
Let's first modify the route to add a post.
Copy the Code code as follows:Route::get (' articles/create ', ' articlescontroller@create ');
Then modify the controller
Copy the Code code as follows:Public Function Create () {Return view ('
The example in this article describes how to add update tags to thinkphp. Share to everyone for your reference. The specific analysis is as follows:
We know, thinkphp's expansion case blog, just tell us how to add tag tag, but did not delete and
The previous section we made a bare plug-in, below we began to let our plug-in began to work!
I. Ways to Improve
Two methods
We implement the Activate and Deactivate methodsCopy the Code code as follows:public static function activate () {return '
This paper describes the usage of smarty template condition in PHP. Share to everyone for your reference. The implementation method is as follows:
Template file test6.html code:
Smarty Test
{if $cond = = 1}
PHP implementation to get Chinese and English according to the first letter
/** * */function Getfirstchar ($s 0) {if ($s 0[0]== ' i ' | | $s [0]== ' I ') {return "I"; }elseif ($s 0[0]== ' u ' | | $s [0]== ' u ') {return ' U ';
In this paper, we describe the method of PHP to read PDF files online. Share to everyone for your reference. The implementation method is as follows:
For a better user experience, it is recommended that you use the Flexpaper online display
background:
Because of the specific work, I made a paper questionnaire, the main content of the questionnaire is to allow users to request the item (number A, A, b ...). ) to prioritize, so I get a good hundreds of copies similar to A>i>h>g>d ....
The examples in this paper describe discuz! The session mechanism in X. Share to everyone for your reference. Specific as follows:
In discuz! X in as always, the session does not use PHP's own session mechanism, but the system of a set of
The following is an illustrated way to introduce PHP to implement Dynamic Web server, the details are as follows:
The server implemented in this article is simply a demonstration and understanding of the principles used to make it easy to
Recently, when developing a PHP program, I encountered the following problem:
PHP Fatal error:allowed Memory size of 268 435 456 bytes Exhausted
The error message shows that the maximum allowable memory has been exhausted. I was surprised at first,
In the development of PHP programs, the interception of strings is often performed, such as the output of the list of information, the title should not be too long, when printing the article summary, but also to perform a series of string
PHP processing session functions include: Session_Start, Session_register, session_is_registered, Session_unregister, Session_destroy, and so on. I believe that everyone in the learning of PHP language is more or less the PHP session function has
PHP has a set of process control functions (which require –enable-pcntl and POSIX extensions at compile time), enabling PHP to create sub-processes like C, execute programs using the EXEC function, and process signals.
Use PHP real multi-process
Recently there is a project demand for the public number on the addition of the weather forecast function, the use of Baidu provided by the car networking API V3.0 in the weather query function. First one final:
Project requirements: Have a good
Using the Json_encode () built-in function in PHP (PHP > 5.2) can be used in PHP to communicate well with other languages and use it.
The function is to convert a numeric value into a JSON data storage format.
The results of the program run as
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