Jul 21

Creating And Deleting Directory in Php

Creating and Deleting Directory in PHP
PHP Directory Function Basics – Part 2

Introduction
This is part 2 of my series, PHP Directory Function Basics. In this part of the series, you learn how to create and delete sub directories in PHP.

Note: If you cannot see the code or if you think anything is missing in this article (broken link, image absent), just contact me at forchatrans@yahoo.com. That is, contact me for the slightest problem you have about what you are reading.

Make Directory
From the point of view of PHP inventors, creating a directory means making a directory, while deleting a directory means removing a directory. To make a directory (sub directory), you use the function,

        mkdir()

To remove a directory (sub directory), you use the function,

        rmdir()

The function names resemble their meanings.

The mkdir() Function
In simple terms the syntax of the mkdir() function is,

    mkdir(string $ dirname)

The argument is the path ending with the new directory name in a string, e.g. “c:/directory1/directory2/directory3/dirC”, where dirC is the new directory name. Replace the content of the file temp.php with the following code and try it:

<?php

    mkdir(“c:/directory1/directory2/directory3/dirC”);

?>

When you try the code, your browser will not display anything, since the code does not have any feedback (echo) statement. However, the directory should have been created. Use your operating system to go to the directory, c:/directory1/directory2/directory3, and you will see the new directory, dirC.

The rmdir() Function
The rmdir() function is used to remove a directory. Note; the directory must be empty before it can be removed. An empty directory might have the dot and double dot items; under such condition the directory is still empty. In simple terms the syntax for the rmdir() function is,

        rmdir ( string $ dirname)

The argument is the path ending with the empty directory name in a string, e.g. “c:/directory1/directory2/directory3/dirC”, where dirC is the empty directory name. The following code removes the directory we created above:

<?php

    rmdir(“c:/directory1/directory2/directory3/dirC”);

?>

Try the code (replacing the previous one). The browser will not display anything, since the code does not have any feedback (echo) statement. Use your operating system to go to the directory, c:/directory1/directory2/directory3, and you will no longer see the directory, dirC.

No Opening and Closing of Parent Directory
Note that with the mkdir() and rmdir() functions, you do not need to open and close any directory (parent).

I hope you are understanding PHP Directory Function Basics. Let us stop here and continue in the next part of the series.

Chrys

To arrive at any of the parts of this series, just type the corresponding title below in the Search Box of this page and click Search (use menu if available):

PHP Directory Function Basics
Creating and Deleting Directory in PHP
The Current Directory
Conditionals and PHP Directory Functions
Scan Directory
PHP is_file and is_dir Functions
 

Written by Chrys

comments: 0 » tags: , ,
Mar 13

Creating the right concept of honor of Health ideological and political work – education

Posted in Political Parties

Article jekky


General Secretary Hu Jintao

“Eight honors” socialist concept of honor, heritage and development of the construction of the Socialist Party of Morality me embodies the basic socialist ethics and substantive requirements of the sector Health in ideological and political work in the program Nova. Currently on how to strengthen ideological and political work, honor and shame surface understanding of some of them: 1, Strengthen ideological and political work as “eight honors and eight Shams” along Main. Ideological and political work is the development of the developing time is called at once directed to make the correct political and ideological work. In the past, to achieve the development of ideological and political activities of any society, they can not without guidance on how the baseline. In the moral climate of today is not ideal, there is no sense of shame in the situation, President Hu Jintao has hit social problems is offered “Eight honors and eight Shams” socialist concept of honor right, and we in the new era of law to RARE provide ideological and political evil, health over the young person responsible. CONSEQUENTIAL, workers’ ideological and political health in any industry, we must always put the “eight honors and eight Shams main line” crosses ideological and political work, and so medical staff can work in the medical service that everyone should join to promote clear what is against what that inhibits so that justice in the medical industry is widespread, nowhere to hide evil. Medical staff who organize social activities to serve the people proud to defend science honor, pride and solidarity, pride of the noble image of law-abiding. Second, ideological and political work Strengthening the “Eight honors and eight shams, depending on the scale. “Eight honors and eight Shams” The text is very clear, very simple and obvious truth, easy to understand, as we strengthen ideological and political work provides an appropriate scale of the masses, so people love between parent and damage to his homeland Office people and leaving between people, defender of science and ignorance, between hard work and good Yat poor, solidarity with the loss of benefits is between people and between the honest and trust worthy unscrupulous law-abiding and lawlessness, of hard work and drive extravagance and dissipation between boundaries of thought, no longer honor the depth of blur good and evil, good and evil, beauty and ugliness of the border is restless, borders are no longer black and white reversed. Social development in China, a critical moment, “Eight honors and eight Shams” clear zone morally right and wrong to divide that public support against what benchmark in social practice and advocate against what the stirrup. This is what we do and the ideological and political work in the health sector magical weapons. This requires that comrades engaged in ideological and political work in the real ideological and political work when “Eight honors and eight Shams” honor establish the correct concept of justice, governance unhealthy, difficult choices. “Eight Eight and shams Shame” plays the role of personal honor medical reference, medical staff, he asked: “Do not hesitate to good rather than bad behavior of small cases,” small things, its starting position, industry dedicated work to build harmonious society will benefit from social and moral development of a new area, and promote economic development through development of new peaks. Third, ideological and political work Strengthening the “eight honors and eight Shams” Ultimately I do not know is often not the adult who is known for thousands of years. Undoubtedly, the market economy and the interests of moral and ethical society traditionally had a major influence on modern society, the diversity of life has given every freedom to choose its own life. Needless to say, today, some officials Chinakayao, some doctors receive a red envelope, opened a large requirement, some researchers are not ashamed of academic corruption, anti-thought-Rong. This feeling of loss of social morality, outrageous debauchery prevailed. have been exceeded those acts of moral bottom line, laws and regulations can play a regulatory role, but some legal gray areas, and purely moral blind spot problem, but the moral force of self-limitation behavior of citizens, which requires health workers to oppose the care industry ideological and political impact of the collapse of basic ethics. We are in ideological and political work must be “Eight honors and eight shams” that ideological and political activities of the bottom line through ideological and political activities of some in a flexible manner so that the hospital staff in mind the “Eight and eight awards Shams “concept proper honor, so that all members of the Communist Party and units based on the example to take a leading role in practice, so that each medical staff can work in health services health deafend solid bottom line is morally must not intersect. Discharge “red envelope” Rejected “Invitation to Dinner” to rebound in the pharmaceutical and patients who are treated, and quality service, not to check the abuses, a large increase in prescriptions and other irregularities in the financial burden on patients to to practice their own hands the power of the masses. Wing of the success that everyone knows, all sense of shame not. Hunan Province, People’s Hospital Ronin Lee County


About the Author
I am an expert

target = “_new” HREF = “http://www.chinaqualitycrafts.com/”> Crafts China Suppliers , tests in general any type of situation industries, flea and tick control cat litter .