Add shared file in project

Hello

I have a library contain many function that i use it in my projects

I need add this file to my project in common not copy

Exactly when i change this file in phpstorm,it changes in original file

With this feature,i can have complete file that in each project it develop it and save it

THanks

0

Hi there,

1) You may place such file in separate folder ... and add such folder as Additional Content Root at "Settings/Preferences | Directories" -- it will be listed as separate node in the Project View panel.

2) Or you may just use old plain symbolic link or similar (will work with files and folders).

 

TBH: this "shared file with code" is not the best idea overall. If you make some change that works in one project ... it may break things in another/older project (especially if it's some not super simple file or has some rather complex logic). if you delete source file somehow ... the symlink/shared folder will stop working as well. Better have own copy and synchronizing it manually when needed.

0

Yes i test Additional Content Root already

But there is a problem

I use codeigniter in phpstorm

I have a helper that i need use it in all project

When i use Additional Content Root ,it add folder to my project

But i need add helper to directory /application/helper for use in codeigniter

If i add helper foler inside project,codeigniter dont detect it for use

 

0

So..? I gave you 2 possible options: one is using IDE functionality (which is not suitable for you case) and one using your OS/file system (nothing to do with IDE).

Have you tried it (the 2nd option)?

0

No i dont know how use second way :(

0

What is your OS?

For Windows, the Link Shell Extension is the most easy to use (instead of using command line).

Other than that: https://en.wikipedia.org/wiki/Symbolic_link

1

The Link Shell Extension is best solution for phpstorm

Thank you

0
Avatar
Permanently deleted user

YEAH, IT WORKS! THANK YOU 

0

请先登录再写评论。