Navigate XAMPP htdocs Files using PHP - Eclipse - php

I'm just starting with wordpress tutorials and I am not familiar in using Eclipse-PHP. It seems like eclipse is easier than notepad++ as editor so that i want to learn how to use eclipse editor.
My problem is its quite pain in the ass figuring out how to just simply navigate my files Using Eclipse. How can I navigate my XAMPP files using PHP-Eclipse.
The picture below shows the expected output on navigator window:
I'll use this to auto update my htdocs files in my localhost server in xampp.
I see the link here which gives the instruction to switch workplace but i don't get how to browse the files with the categories below:
Please help me with this and i'm about an hour exploring php eclipse.
Your help will be greatly appreciated for a starter like me.

In Eclipse you create "projects" as opposed to browsing the entire filesystem. So in this case let say you had a blog to work on that you have in htdocs/theblog.com.
You would right click on the project explorer window and "Create new project" then choose the appropriate project type - in this case PHP. Then you would select the option that says use an existing location and browse in typical fashion to htdocs/theblog.com. Then proceed through the rest of the wizard. and finish.
Eclipse will then index the project and run a series of validators and stuff... essentially "building" the project. After that you will see the project in the project explorer pane. You can repeat this for all your individual projects.
Like wise you can close and open projects to keep them out of the way when youre working on one or another.

Related

Eclipse for PHP, how to make it to include downloaded files in project?

first of all I explain the reason why I try to do it.
I tried many editors/IDEs which could provide convenient syntax and variables check. Eclipse did the best.
But it works correctly only if I work with its project, otherwise there are a lot of glitches and no correct support of syntax suggestion/auto-complete.
I set my FTP client to download files into project's folder, but Eclipse does not recognize them as a part of this project so I still don't have it's full support. If I create PHP files with Eclipse in the same folder it works just fine. Is there a way to make read all PHP files in project folder as parts of a project?
Or, if you can suggest IDE which performs syntax check/auto-complete tasks as Eclipse does please do, I check if I tried it. I can't include all CMS into project, because it is Bitrix, it can kill any IDE which can try to chew it, so I just need a reliable tool which could work as code validation of currently edited script. The perfect tool could just be set for PHP 5.6/7.1 for example and perform validation based on language rules.
If you are trying to get Eclipse php support for randomly downloaded files you can set your FTP client to download that files in project's folder. Then you open Project Explorer in Eclipse, press refresh button to get actual folders/files list, find you file in there and open it by that project explorer. That makes Eclipse to consider that file as a part of your project so auto-complete and validation works fine. Other ways of opening it does not count.

How to access php project from localhost (Apache)

I know this question may first appear to be a duplicate of others, but I'm asking this because I have WordPress installed in my /var/www/html directory. I was learning WordPress a couple of years ago before creating a website and never used it again.
Well, I'm creating a php project using PhpStorm and testing in my browser. I'm following a tutorial so I can configure my databse (phpmyadmin), and the instructor keeps going to his localhost, which displays the directory structure as seen here:
Since I have WordPress on my localhost, navigating to that takes me to my WordPress installation, which is not what I want to access.
I would rather ask this question on here before I potentially break my Apache configuration, so how can I access this project? Do I need to remove WordPress completely? It would be nice to keep it for future testing since I'm slowly getting into making plugins.
What are your suggestions? I can't really say much as far as "what have you tried?" since I don't know where to begin.
Running in Chrome within my PhpStorm IDE takes me to localhost:63342/projectName/respectivePhpFileName.php, but I can't access it outside of the IDE yet.
Any help would be appreciated.
Just move your Wordpress outside your htdocs folder...I think he is using something like XAMPP so in that way is very easy to do it, because the folder without an index will be detected as a directory not a Wordpress URL (correct me if I'm wrong). So if that doesn't works, just go to your htdocs (/var/www/html or opt/lampp/htdocs in Linux) directory (or where your wordpress is stored) and move it to other folder (like My documents) where you can backup it, and that's it, you can create that folder and keep following that tutorial.

Eclipse does not parse new class file

I created one class file in eclipse IDE. However, Eclipse does not include that file in the searching list when I press Ctrl + T for searching a type. I don't know why this happens. Has anyone met this problem before? What's the solution? Thanks for help.
P/S: I'm using PDT plugin for Eclipse
Eclipse autocomplete function also didn't work, when I press Ctrl + , there's no autocomplete list.
Here are a few things you can try:
Make sure the file is in a source folder in a Java project. If you just create an arbitrary .java file somewhere, it doesn't necessarily get compiled (and added to the list of types for the type browser) - it has to be on the build path of a Java project.
If 'Build Automatically' is not turned on, have you built the project?
Occasionally, projects can get in a weird state. Try cleaning the project (Project > Clean...).
I can solve the problem by myself. I inspected the log file of Eclipse and see that there're some problem with the workspace. I deleted the workspace and created new workspace with old project. The problem disappeared.

How to create Eclipse project from existing git repo

I have an existing project utilizing git and have just installed eclipse along with egit. I pointed to the git repository with egit and can see all my files, my existing branches and can switch between branches.
When I open a file from the view of the git repository it does not seem to recognize that it is a php file, doesn't show me the classes within it and doesn't do code completion. If I just drag a file in from explorer it at least recognizes that file as php, but doesn't understand the project well enough to show me code completion from installed libraries. I think I need to configure eclipse to understand the projects home directory, but am a bit lost. Any help would be appreciated.
Your answer may fall within this guide to change the "nature" of your project. It's at least worth exploring. I will be attempting to do the exact thing you've described some time this week so hopefully it will work. The wiki doc also suggests that certain "natures" may conflict with each other but hopefully that won't be the case here. Link -->
http://wiki.eclipse.org/IRC_FAQ#How_do_I_manually_assign_a_project_Nature_or_BuildCommand.3F
After just trying to reproduce your steps I am having the exact same experience. I believe this may be "expected" behavior. For clarity, when I open a php file from the "PHP Explorer" view everything seems to work fine but when I open a php file from the "Git Repositories" view Eclipse treats it as a text file (no code highlighting etc.). I suggest that you work from the PHP Explorer view and leave the Git Repositories view open separately only to watch/monitor the repository not as a working view of files to edit and what not.
You need to open it as a PHP Project from existing source (GIT working folder) then share the project with Git, ie, right-click on the project, go to Team > Share project, click on Git.
See http://www.youtube.com/watch?v=-Zba8iAnLms for a demo.
Did you install the pdt plugin in eclipse? It should recognize any .php file opened. Shouldn't matter where it's located.

How can I open my project in Zend? I accidentally removed it from the left pane

I accidentally removed the application from the left pane and now I can't get it back no matter what I do.
I tried opening the .solution file from within Zend Studio, but it only loads the file, not the entire solution.
How can I have it load the entire application?
Edit:
I still can't what to open. In Visual Studio, you can open a project file, and that loads everything necessary in the application. Why is Zend so complicated?
are you talking about a project within zend studio or your entire profile? If its a project click file->import, under the general tab theres "existing project into workspace" and point that to root folder of the missing project.
if you want your entire profile (workspace), click file switch workspace and you should have a folder called workspace in your documents folder.
If you are just missing the project window, click window->show view-> php explorer
hope this helps
try to locate your Zend Studio Profile inside your home directory. This IDE stores sometimes (when no other configuration is set) the project infos there.

Categories