In Feburary 2016 25,
The list of permissions you supply to the 'mkdir' function are valid only on Linux-based file systems. This means you cannot associate permissions with a directory you create under Windows. If you pass permissions with the 'mkdir' function under Windows, PHP simply ignores them.
Default User Account
Remember that a script run on a Web server from a browser runs under the default user account on the Web server such as 'www-data,' not under your user account. If directory permissions are not working, it may be because you are testing a script under your account instead of the default user account. You can test the script as the default user by typing 'su www-data' and exploring the directory permissions assigned to that user.
Directory Mask
If the resulting permissions of a new directory are different from what you passed, it may be because of a directory mask applied to the permissions. The mask is maintained by the Web server, not by PHP. To circumvent the mask, use the 'umask' function to set the mask to zero, create the directory using 'mkdir' and change the directory permissions using the 'chmod' function. For example:
$save = umask(0);
if (mkdir($newdir)) chmod($newdir, 0755);
umask($save);
?>
Recursive Assignment
The 'mkdir' function takes a second optional argument that creates nested directories recursively. When you assign directory permissions recursively, the permissions may not be executed in the proper order and you might get different results from what you expected. To ensure the proper order, use the 'chmod' function to assign directory permissions to the new directory after you create it with the 'mkdir' function. For example:
if (mkdir($newdir, 0755, true)) chmod($newdir, 0755);
?>
In Feburary 2016 25,
Showing posts with label Remember. Show all posts
Showing posts with label Remember. Show all posts
Thursday, 25 February 2016
Friday, 19 February 2016
How to Host a FundraiserIn Feburary 2016 19,
In Feburary 2016 19,
Pick a theme. Before holding your event, choose a theme that will represent your cause. If you're raising money for an international adoption, bring in food and decor from that country. If you're trying to raise funds for a charity, come up with ideas that tie into your cause. Even the invitations or fliers should reflect the theme of your event.
Create a budget. Remember that you're trying to raise money, so you are going to have to work within a pretty tight budget. Ask vendors in your area if they would be willing to donate food, raffle prizes or other items for your fundraiser. Some may not have anything to donate but will give you money towards your cause.
Prepare a menu. Depending on your cause, you need to choose between a casual menu or a formal dinner. Some great fundraisers have featured a barbecue, while other successful events have included a 5-course meal. Since you are working within a limited budget, your menu will depend largely on what you can afford to spend. You can have an elegant meal on a small budget just by shopping around at warehouse grocery stores.
Plan the entertainment. You should have something planned besides just a dinner. One great way to raise even more money for your cause is to have a silent auction or even a public auction. You can ask local vendors to donate items to auction. You can also invite a band to play or have a talent show. Try to do something that ties into the evening's theme.
Present your cause. With all of your planning for the fundraiser, it's easy to forget why you are inviting these people here in the first place! Prepare a short presentation about your cause, showing everyone why you are desperate to raise funds and how they can help.
In Feburary 2016 19,
Pick a theme. Before holding your event, choose a theme that will represent your cause. If you're raising money for an international adoption, bring in food and decor from that country. If you're trying to raise funds for a charity, come up with ideas that tie into your cause. Even the invitations or fliers should reflect the theme of your event.
Create a budget. Remember that you're trying to raise money, so you are going to have to work within a pretty tight budget. Ask vendors in your area if they would be willing to donate food, raffle prizes or other items for your fundraiser. Some may not have anything to donate but will give you money towards your cause.
Prepare a menu. Depending on your cause, you need to choose between a casual menu or a formal dinner. Some great fundraisers have featured a barbecue, while other successful events have included a 5-course meal. Since you are working within a limited budget, your menu will depend largely on what you can afford to spend. You can have an elegant meal on a small budget just by shopping around at warehouse grocery stores.
Plan the entertainment. You should have something planned besides just a dinner. One great way to raise even more money for your cause is to have a silent auction or even a public auction. You can ask local vendors to donate items to auction. You can also invite a band to play or have a talent show. Try to do something that ties into the evening's theme.
Present your cause. With all of your planning for the fundraiser, it's easy to forget why you are inviting these people here in the first place! Prepare a short presentation about your cause, showing everyone why you are desperate to raise funds and how they can help.
In Feburary 2016 19,
Subscribe to:
Posts (Atom)