Design a Phone Directory which supports the following operations:
get: Provide a number which is not assigned to anyone.
check: Check If a number is available or not.
release: Recycle or release a number.
Example:Init a phone directory containing a total of 3 numbers:0, 1, and 2.PhoneDirectory directory = new Phonedirectory (3);// It can ret
The app/directory is the primary directory for the program.
App/actions Place the controller file, support multilevel directory. If it is a controller, the file must be ***action.php, and if it is an abstract class, it must be ***.php.
App/models the file name of the model model is ***.php which * * must match the Model class name in the file
App/views Place an a
Default.gif (this image is a template thumbnail) must be a valid template in the directory
Copy CodeThe code is as follows:
function Get_template ()
{
$template = Array ();
$dir = Cms_root. ' /tpl/';
$n = 0;
if (Is_dir ($dir)) {
if ($dh = Opendir ($dir)) {
while (($file = Readdir ($DH))!== false) {
if ($file = = '. '
Default.gif (this figure is a template thumbnail) must be a legitimate template under the directory
Copy Code code as follows:
function Get_template ()
{
$template = Array ();
$dir = Cms_root. ' /tpl/';
$n = 0;
if (Is_dir ($dir)) {
if ($dh = Opendir ($dir)) {
while (($file = Readdir ($DH))!== false) {
Default.gif (this image is a template thumbnail) must be a valid template in the directory
Copy the Code code as follows:
function Get_template (){$template = Array ();$dir = Cms_root. ' /tpl/';$n = 0;if (Is_dir ($dir)) {if ($dh = Opendir ($dir)) {while (($file = Readdir ($DH))!== false) {if ($file = = '. ' or $file
I want to put it in the SRC directory.
Reply content:
I want to put it in the SRC directory.
About the location of template files
The template file is placed in the SRC directory for only one reason: your template file belo
The app/directory is the main directory of the program.
App/actions Place controller files, support multi-level directories. In the case of a controller, the file must be ***action.php, and if it is an abstract class, it must be ***.php.
App/models the file name of the model is ***.php where * * must be consistent with the model class name in the file
App/views Place an attempt to file or
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.