"/Bin/bash ^ m: Bad Interpreter: No file or directory (Bad Interpreter: no such file or directory)" appears when compiling the cocos2d-x to run the script in Linux) "This is an error.Solution:Enter sed-I's/\ r$ // 'make-all-linux-project.sh on the terminal.Here, the make-all-linux-project.sh is my file name, which can be changed to what you need.Cause:This file has been edited in windows. In Windows, each l
Looping through the creation of directory methods
This will generate the Image.gif directory
Copy the Code code as follows:
$filepath = "Test/upload/2010/image.gif";Mk_dir ($filepath);Looping through the creation of catalogsfunction Mk_dir ($dir, $mode = 0755){if (Is_dir ($dir) | | @mkdir ($DIR, $mode)) return true;if (!mk_dir (DirName ($dir), $mode)) return false;Return @mkdir ($dir, $mode);}
The secon
1, form section:
Copy the Code code as follows:
2, Process the form page:
Copy the Code code as follows:
$mkdir _file_dir = mkdir ('./img/'. $_post[' title '],0777); Get to the title, create a folder underneath the final directory to hold the file specified by the category$tmp _file_name = $_files[' file ' [' Tmp_name ']; Get a temporary file after uploading$file _name = $_files[' file ' [' Name ']; source file$file _dir = './img/'. $_post[
How PHP Gets the current directory and relative directories
There are many ways to get a directory in PHP, and here's how to get the current directory and relative directory using PHP to avoid confusing it.
Traverse all files and folders in a folder and copy the matched files to the same directory. In the following example, all the html files in the "/www/pooy/Ke" directory are copied to the "/www/pooy/bk" directory. The code is as follows:Copy code $ Dir = "/www/pooy/shortke ";Static $ dir_list = 0;Static $ file_list = 0;Function l
#This code implements renaming a directory file under a folder and moving the directory#list = Os.listdir (datadir) #列出文件夹下所有的目录与文件#For i in range (0,len (list)):#path = Os.path.join (Datadir,list[i])#list2=os.listdir (path)#For J in Range (0,len (list2)):#path2 = Os.path.join (Path,list2[j])#if Os.path.isfile (path2):# Break#Else:#list4=path.split ('/')#Os.rename (path2,datadir+list4[4]+ ' _ ' +list2[j])#l
1, first look at the scriptCat recursive.sh#!/bin/shRead-p "Input path:" FilePathfunction Getallfiles () {For file inls $FilePathDoIf [-f $file]ThenEcho $fileMV $file/bak_file/Elif test-d $fileThenecho "-------------------------------->"CD $fileFilepath=pwdGetallfilesCd..Echo-e "\033[32m[############ $file is a directory .... #######]\033[0m"echo "Elseecho "$FilePath is a invalid path"FiDone}CD $FilePathGetallfiles $FilePath2, test, now say all files
DF View root directory full disk space [[emailprotected] logs]# DF File System 1k-block used available% mount point /dev/sda2 41284928 0 Span style= "FONT-SIZE:14PX;" > 41284928 100%/ tmpfs 1962324 0 1962324 0%/DEV/SHM /dev/sda1 516040 59236 430592 13%/boot /dev/sda5 1542096 35072 1428688 3%/data View space consumption in the root directory, accounting for only 10GConjecture should not fr
1. Get the files in the SRC directory in Java engineering
Example: Get the test.properties file under the SRC directory
public class Getfilefromsrcpath
{
public static void Main (string[] args)
{
InputStream is = GetFileFromSrcPath.class.getResourceAsStream ("/test.properties");
}
}
2. Get the Webinf path in Java Web Engineering
Request.getsession (). Getservletcontext (). Getrealpath ("/web-inf
My site has a lot of sub-domains, each sub-domain corresponding to a directory, almost every directory has users uploaded files. Now I want to separate the files and procedures, but I don't want to change the procedure. So I thought of the directory mapping, but WIN2003 only provided a directory that mapped one disk to
In some cases, if the C disk is not enough, it can cause some problems and need to transfer the database and logs to another disk.We need to use Ntdsutil.exe to transfer active Diretory database and transaction and logTo set the domain controller active Directory database to ActiveEnter filesInfo View Current LocationIntegrity checkRepairing the databaseStart the AD DS serviceIi. reorganization of the active Direc
Label: tar package compression specified directorySometimes, we may need to compress the file/directory to the specified directory. For example, to compress all the files and directories in the/home And/boot directories to the Bak directories, you must first create a Bak directory, copy the/home And/boot directories to the Bak
Unlimited directory replication, stationmaster original, although only wrote a few minutes, but still very useful
$o _path= "admin";//Source Directory
$n _path= "n_admin";//New Directory
Class Copy_path
{
function Wm_chief_copypath ($o _path, $n _path)
{$hand =opendir ($o _path);
if (!file_exists ($n _path))//target directo
PHP removes the entire directory that matches the criteria, matches the entire directory
PHP
/** * @name The Delfile function is used with the Deldir function to delete the entire directory that matches the condition * @param string $path Specify the action path * @return Null * @example deldir (' D:\web\Apache\htdocs\KeyShareMall\Pc\ThinkPHP '); */ D
Org.springframework.context.support.classpathxmlapplicationcontext;import Org.springframework.context.support.filesystemxmlapplicationcontext;import Org.springframework.test.context.contextconfiguration;import Org.springframework.test.context.junit4.springjunit4classrunner;import com.wql.vo.user;/** * Spring Test * The load file is placed under the class directory * @author Lenovo * */@RunWith (Springjunit4classrunner.class) @ContextConfiguration ("C
Grandma's, made a day, with Maven Fortunately, a built automatic health specification of the project directory, this gradle on the internet to look at a variety of examples. With the building is not the same, in anger under the study of the end, this is how to change how to change!Server project directory Building, Gradle build Project Web directory, source Folde
1. Write a program to copy all the. java files from the D: \ java directory to the D: \ Jad directory and change the original file extension from. java to. jadPackage Copy;import Java.io.bufferedinputstream;import java.io.bufferedoutputstream;import java.io.File;import Java.io.fileinputstream;import Java.io.fileoutputstream;import Java.io.filenamefilter;import java.io.IOException; Import Java.io.inputstream
Program | execution
1. System.Diagnostics.Process.GetCurrentProcess (). Mainmodule.filenameGets the full path of the module.2. System.Environment.CurrentDirectoryGets and sets the fully qualified directory of the current directory (the directory from which the process starts).3. System.IO.Directory.GetCurrentDirectory ()Gets the current working
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.