mkdir

PHP is_dir and mkdir not working on mapped network drive

蓝咒 提交于 2019-12-08 07:48:59
问题 I have mapped my Z: drive to point to a file share on another server on my network in Windows Explorer. I can access the files and read/write just fine there. When I try to execute mkdir() from PHP, I get a "No such file or directory" error. As a test, I gave Everyone access to read, write, and execute and it is still not working. The code I am using: mkdir('Y:/newfolder/', 0777); I have also tried mapping the drive again within PHP to no avail: system('net use Y: "\\DEV01\share" Password1

Files not being uploaded in dynamically created folders/subfolders

落花浮王杯 提交于 2019-12-08 05:17:37
问题 i need help to solve this problem Files not being uploaded in dynamically created folders/subfolders! creating a dynamically subfolder using input type text and when i uploaded file moved to uploads folders but not moved to subfolder which is create using input type text? but dynamically creating function working fine and also showing me folder which is typed in the textbox into the upload folder Here My Code //creating dynamically subfolders $folder = $_POST['folder']; foreach( $folder as

How to create a file in a specific directory

让人想犯罪 __ 提交于 2019-12-07 08:42:41
问题 I already find a way to do what I want, but it seem dirty. I just want to do a simple thing sprintf(serv_name, "Fattura-%i.txt", getpid()); fd = open(serv_name, PERMISSION | O_CREAT); if (fd<0) { perror("CLIENT:\n"); exit(1); } I want that the new file, instead of be created in the directory of my program, it's created directly in a subdirectory. example my files are in ./program/ i want that the files will be created in ./program/newdir/ I tried to put directly in the string "serv_name" the

how to use data variable in mkdir in a linux server with FTP?

那年仲夏 提交于 2019-12-07 07:52:30
I need to create a folder in my FTP server, whose name is "YYYY-MM-DD"; I have this variable: slideshow=$(date +"%Y-%m-%d") but I can not use it in FTP with mkdir, since it's a shell variable. I've also tried with echo, and there it works (I have "mkdir 2015-05-25" in a sh file), but if I have a series of commands that have to be run, just the first ftp -n ftp.xxxx.it. is run, the rest (user, password) isn't. I hope you could help me, Thanks auth private this script seems to be like this topic enter link description here but you can do it easily by mkdir a new directory on your pc then upload

How to create directory with right permissions using C on Posix

喜欢而已 提交于 2019-12-06 23:47:27
问题 I am trying to write a simple C program that creates directories (a mkdir clone.). This is what I have so far: #include <stdlib.h> #include <sys/stat.h> // mkdir #include <stdio.h> // perror mode_t getumask() { mode_t mask = umask(0); umask (mask); return mask; } int main(int argc, const char *argv[]) { mode_t mask = getumask(); printf("%i",mask); if (mkdir("trial",mask) == -1) { perror(argv[0]); exit(EXIT_FAILURE); } return 0; } This code creates directory with d--------- but I want it to

QDir mkdir with absolutepath

倖福魔咒の 提交于 2019-12-06 21:15:09
问题 I have problem with the creation of dir with Qt. I would like to create a dir in documents'dir so, I make some things like that : QString path("C:/Users/Me/Documents/MyApp/profiles/"); Qdir dir = QDir::root(); dir.mkdir(path); But that doesn't work! I have test with "/" and "\" for the separators but in the two cases that not work. How I can create my dir? Thank you. 回答1: Try to use QDir::mkpath as dir.mkpath(path); 回答2: You can do this: QDir dir(path); if (!dir.exists()){ dir.mkdir("."); }

Can't create a folder with mkdir

我的未来我决定 提交于 2019-12-06 14:37:52
问题 Environment info: *Windows Vista *PHP 5.2.9-2 I'm working on a project. Let's say it's name simply "project". My php files meant for user-interaction will be found at project/file.php Now, I have a database behind this and some maps, which contain classes and configuration files in general. There is also a map for the users, in which I store images they might upload. For instance: project/files/Users/0/profilePic.jpg The number corresponds with the user_id in the database. My register.php

How to create a file in a specific directory

£可爱£侵袭症+ 提交于 2019-12-05 14:11:49
I already find a way to do what I want, but it seem dirty. I just want to do a simple thing sprintf(serv_name, "Fattura-%i.txt", getpid()); fd = open(serv_name, PERMISSION | O_CREAT); if (fd<0) { perror("CLIENT:\n"); exit(1); } I want that the new file, instead of be created in the directory of my program, it's created directly in a subdirectory. example my files are in ./program/ i want that the files will be created in ./program/newdir/ I tried to put directly in the string "serv_name" the path that I want for the file, it was like sprintf("./newdir/fattura-%i.txt",getpid()); Also tried the

Android mkdirs() not working

你。 提交于 2019-12-05 08:45:40
I''m developing my first Android application and I'v run into a problem while trying to create a directory to save recorded video files. I have a method in my main activity buttonOnClickRecord that invokes an intent to use the android camera, I'm also creating a file during this method call and I'm calling the mkdirs() method on it to create the directory to store the file. I have also implemented <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" /> in my Manifest. public void buttonOnClickRecord(View v){ mediaFile = new File(Environment.getExternalStorageDirectory()

How to create directory with right permissions using C on Posix

南楼画角 提交于 2019-12-05 03:44:35
I am trying to write a simple C program that creates directories (a mkdir clone.). This is what I have so far: #include <stdlib.h> #include <sys/stat.h> // mkdir #include <stdio.h> // perror mode_t getumask() { mode_t mask = umask(0); umask (mask); return mask; } int main(int argc, const char *argv[]) { mode_t mask = getumask(); printf("%i",mask); if (mkdir("trial",mask) == -1) { perror(argv[0]); exit(EXIT_FAILURE); } return 0; } This code creates directory with d--------- but I want it to create it with drwxr-xr-x like mkdir do? What am I doing wrong here? Edit: This is the working solution