我正在使用Symfony2开发一个应用程序。我的问题是,当创建一个文件夹时,在一个没有sudo权限的实体中创建一个函数,我想知道如何能够直接创建具有sudo权限的文件夹。这是我的代码:
protected function getUploadDirMark()
{
// get rid of the __DIR__ so it doesn't screw when displaying uploaded doc/image in the view.
return 'uploads/documents/'.$this->ge
我在一个想要写到.exe.config的应用程序上遇到了问题。
见以下代码:
using System;
using System.Configuration;
using System.IO;
namespace ConfigurationManagerError
{
class Program
{
static void Main(string[] args)
{
try
{
// set Config-File to persistent folder