Reputation: 16278
I'm using the following locations for CakePHP folders:
/home/cakephp/lib - for the core files
/home/apps/app - for my application files
/var/www/webroot - for the webroot folder, which is visible by the web server
The thing is that when I create a PHPStorm project, my "Project Root" would be /home/apps/app
but that would mean webroot
folder is not going to appear inside the project's scope, ergo I would not be able to edit CSS
or JS
files located under webroot/css
, webroot/js
How can I solve this?
Upvotes: 1
Views: 508
Reputation: 165188
You have few possible options (regardless of the framework used):
Keep your webroot
folder inside the actual project. You can then setup automatic deployment so it will copy your files from the project location to the website location (Settings | Deployment
-- entry of "Local or Mounted folder" type; then check "Options" for automated stuff).
You could (I prefer and would recommend this approach) configure your Apache (or whatever web server you have there) to serve files directly from your project folder so no copy files will be required (via virtual host and custom/fake domain name (that can be faked via your hosts
file or local DNS server if you have one)). This works just fine and even better than accessing website via shared URL (e.g. http://localhost/mysite/
) -- compare to http://mysite.dev/
-- this one is much closer to real-word configuration).
Don't do anything from the above -- just attach that folder as Additional Content Root (Settings | Directories
).
Upvotes: 1