Let's build the first model.
Copy the Code code as follows:PHP Artisan Make:model Article#输出Model created successfully.Created migration:2015_03_28_062517_create_articles_table
Look at the resulting file app/article.php
Nothing special, except
Recently read a book, the inside mentioned some hash algorithm. The more impressive is the Times33, at that time understanding is not very test, today wrote a paragraph program to verify a bit.
First on the code:
Copy CodeThe code is as follows:
/*
You can use the following PHP functions to verify whether a card number is a credit card:
function Validatecard ($cardnumber) { $cardnumber = preg_replace ("/\d|\s/", "", $cardnumber); # Strip any non-digits $cardlength = strlen ($cardnumber)
Today in the change paper online encountered a statement can not understand:
$if _summary = $row [' if_summary ']==2? ' Yes ': ' No ';
Later found in Baidu is the ternary operator of PHP
The meaning of this sentence is equal to
if ($row ['
Approximate requirements:
Each order has a number of file attachments, in the download of the time you want to the current order files automatically packaged into a compressed package download
Details Required: Current order number _ Month Day +
1. Update
Www.php.net
Copy the Code code as follows:sudo apt-get update
2. Installing Nginx
Copy the Code code as follows:sudo apt-get intsall nginx
The file structure of Ubuntu after installation is roughly:
* All configuration files are
The example in this paper describes the method of Smarty template to determine the empty array. Share to everyone for your reference. Specific as follows:
Here are two main ways of doing this:
1. Use count to get the number of subscripts in the
In PHP we sometimes need to include a file. For example, I used to write a framework, I intend to use the original PHP as a template, and then write a display method to introduce template file, but this is just my fantasy.
After writing, it is
Recently the company wants to generate a report, generated in PHP.
Header ("Content-type:application/vnd.ms-excel");Header ("Content-disposition:attachment;filename=test_data.xls");
I Baidu, seemingly this can be achieved soon, but this file is
The single-instance class in PHP is useful for exchanging data and saving memory. Write a simple example.
Class 1, the single-instance class itself:
Class UTIL { private static $instance; Public function Get () { if (!self:: $instance) {self
#touch a.php //create a.php file #vi a.php //edit a.php file with VI
input and save
#php a.php //Run a.php file
Display: e10adc3949ba59abbe56e057f20f883e
A. On Linux or UNIX, md5sum is the tool that is used to calculate and verify the file
Scenario One: Grunt-livereload + Chrome Plug-in
Advantages: Simple and convenient installation and configuration.Disadvantage: need to cooperate with the specified browser plugin (Firefox also has relevant plug-ins, ie, you understand).
1. Need to
The examples in this article describe how Smarty uses custom resources. Share to everyone for your reference. Specific as follows:
query ("sel ECT Tpl_source from my_table where tpl_name= ' $tpl _name ' "); if ($sql->num_rows) {$tpl _source = $sql->
The resources in Yii are files related to Web pages, which can be called by the Web server, such as CSS files, javascript files, pictures or videos, and resources placed in a Web accessible directory.
Sometimes some functions need to be planned, so
With the progress of science and technology, we often see barcodes and QR codes, especially in the era of smart phones are more active, today I give you to share how to use PHP to generate two-dimensional code, as to how to generate two-dimensional
This article introduces the HTTP protocol post request parameters in PHP, as follows:
The information in web development is basically all in the post and get request and response, get because of its URL-based intuitive, easy to understand, can post
This article describes in detail the use of apache2.2.21/php5.3.5/mysql5.5.19/phpmyadmin3.4.9 to build PHP development environment under WINDOWS2003.
First step: Download the installed files
1. Apache version Httpd-2.2.21-win32-x86-no_ssl.msi
2.
Verification code in the form implementation more and more, but with JS write verification code, always feel inconvenient, so learned the next PHP implementation of the verification code.
Well, there is nothing to do, but do not want to waste time,
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