How to create new folders on my domain name - file-upload

As you can tell from the title, I don't know what words that I should use to describe what I want to do.
I just want to be able to change my website's files from:
www.example.com/bark.php
and www.example.com/leaves.php
to
www.example.com/tree/bark.php
www.example.com/tree/leaves.php
While having a www.example/tree.php page as well.
So, I'm working with PHP and am building this with Sublime text editor. Is this an .htaccess job?
Thanks in advance :)

You don't need .htaccess or any programming language.
Simply create the folder, put your files in it, and upload them back to the server. You'll also want to delete the old files on the server as well.
Alternatively, you can rename the files on the server itself. You can either right-click on the target file, and click 'Move'.
You can also drag the files directly by clicking-and-dragging:
The file www.example.com/tree.php is just another file, stored in the ROOT folder. You are allowed to have a folder and a file with the same name.
www.example.com/tree will point to the tree folder, and attempt to access the index at www.example.com/tree/index.html or www.example.com/tree/index.php.
The file www.example.com/tree.php will not be loaded when viewing www.example.com/tree without .htaccess configuration.
Hope this helps! :)

Related

How to Create .cmake File

I was working on a project which requires me to add a user.cmake file in the root directory. Can anyone help me out hot to create the .cmake file...
Link to Project Directory
According to the link you provided user.cmake just needs to point where so-called eego sdk is located in your file system:
set(EEGO_SDK_ZIP /path/to/download/eego-sdk-1.3.19.40453.zip)
There is nothing fancy actually here, just make a plain text file, put this one line (don't forget to replace the EEGO_SDK_ZIP variable content) and save it with the name user.cmake

'Resources' is not a member of 'WTApp.My'

I get this error and I can't start my application or edit it.
I've tried deleting the Resources folder and putting everything back and it doesn't help. I also checked my 'Resources.resx' custom tool namespace, and it's fine (uses "My.Resources").
I've tried deleting my images by moving them. It's as if the resx file is hidden from VB.
I really have no idea where to go from here :(
enter image description here
Application resources are added to Resources.resx file. It create a static property against each added resource while file are stored in a Resources folder physically on the file system however, they are embedded into application on compilation depending.
Because you have deleted the resources(images most likely) from Resources folder but application (Resources.resx) is still referencing to these files.
There are two ways to fix it.
1- Go to application resources TAB and delete all the resources & Added the back.
OR
2- Put all the resources into Resources directory. select all and include them (because you had deleted them once so, they may still present in the directory but are not included in project). if you do not see in folder(from visual studio then make sure to click show All Files button on the solution explorer.
This shows how to go to Resources TAB
This shows how to include resources which already exists in the folder (got deleted)

Is there a possible way to open a file in visual basic by just putting the name of the drive?

Recently I made an application that has lots of PDF files in it and I made a setup for it using Inno Setup Compiler. In the setup, I allowed people to change where they want to install the app. For opening my PDF files, I used: system.diagnostics.process.start("My pdf.pdf")
My problem is that in the code above, I put drive "C:" and when my user changed the install directory to drive "D:" the pdf's did not work and the error showed that "Cannot find the specific file". My question is that is there a way to just put the name of "computer" or "a drive" in the code above, not the specific name of the pdf, and let the computer find the file itself?
You seem to be asking for an opposite of what you actually want to achieve.
I assume you are installing files with known names. What you do not know is the directory of the files.
From your description I assume that your actual code is like:
System.Diagnostics.Process.Start("C:\My pdf.pdf")
But when the user chooses a different location (directory) for your application, the above code with a hard-coded absolute path fails.
If your application installs to the same directory as the PDFs, just use a relative path (in this case just a file name without any path). It makes an operating system look to the current working directory, which will typically be an application directory.
System.Diagnostics.Process.Start("My pdf.pdf")
Or to make it more reliable, make it explicitly look to the application directory. For that use Application.StartupPath:
System.Diagnostics.Process.Start(
System.IO.Path.Combine(System.Windows.Forms.Application.StartupPath, "My pdf.pdf"))
See also Get program path in VB.NET?

Trying to create .htaccess file using ftp doesn't work

I want to create a .htaccess file in a specific directory. I'm using Notepad++ and their plug-in for FTP (NppFTP). I'm able to create any other files and see them in the folder but when I try to create a .htaccess I don't see that file in the directory. I get no errors, it is like nothing happened.
I tried to create this file using an FTP program and it showed the file and right away it disappeared. My guess it is because this is a special file used by the system and prefixed by a (.)
What is a way to edit that file?
This is probably because your ".htaccess" file is a hidden file and your system is set up to no display hidden files.
Have a look in your Notepad++ settings if there's an option to make hidden files visible/unhide.
In addition to that check the windows folder options for that option!
switch on showing hidden files in your ftp client

Intellij Idea problem with text file impossible to read

I have a problem using Intellij Idea.
I am absolutely unable to load text file as InputStream - it doesnt matter where do I put the file (main/java, main/resources...) it just can't find the file - in Eclipse everything works just fine.
I tried setings->compiler->resource patterns and added ?*.txt but that doesn't seem to work either.
Any help is appreciated.
If you load it as a File, make sure that Working Directory is properly set in IDEA Run/Debug Configuration, since it's the default directory where Java will look for a file when you try to access it like new File("file.txt"). Working directory should be set to the directory of your project containing .txt files.
If you load files as a classpath resource, then they should reside somewhere under Source root and will be copied to the classpath according to Settings | Compiler | Resource Patterns.
If you can't get it working, upload your project somewhere including IDEA project files so that we can point to your mistake.
Look at the image, notice that the txt files are in the project root, and not the source folders (in blue).
If you open the Project Structure dialog, and click on Modules and select your module - are the correct folders marked as Source Folders on the sources tab?
Link for how to get to Project Structure dialog
Also, if you print out the absolute path of that file you are trying to read, is that anywhere near where you expect it to be?
An easy way to figure out the same would be to try creating a file in the same fashion and see where it gets created in your project. You can put your input file at the same location and it should work just fine (if it doesn't, you should check your resource pattern which might be causing the file to be not copied over in the build output).
This method actually gives you the working directory of your intellij settings which is pointed out in the accepted answer. Just sharing as I had similar trouble and I figured out this way. :)