Reputation: 3305
Is there a way to have your PHP interpreter (I'm using WAMP) installed locally but have it run for files on the network? So I have...
C:\wamp\bin\php\phpx.x.xx\
(Local install)and
Z:\www\example.com\index.php
(Network)How can I open index.php
in the browser and have it run the interpreter? Of course, the way I currently run things is saving to C:\wamp\www\path\
and pull up http://localhost/path/index.php
in the browser.
I'm wanting to avoid having to remote connect to my developer desktop to access local files there. I'd rather put my .php
files on the network and work with them anywhere.
Upvotes: 0
Views: 393
Reputation: 20286
Of course Quentin answer is good but I looked more into your problem and it's pretty typical.
You should consider using Control Version System like GIT and create Repository. Then put code there. Your developers will download it and run it on their own machines and you can check the files using for example GitLab or GitHub or any other service or even console.
In that configuration you can have:
Upvotes: 0
Reputation: 6521
Wamp uses Apache as web server and this web server has virtual host by default. If you add new virtual host for network it will work.
Also you can add alias to your Apache config
Upvotes: 0
Reputation: 943510
The browser cannot involve the PHP interpreter. It talks to a webserver, the webserver runs PHP.
You can configure Apache to use whatever directories you like with various directives such as
DocumentRoot "Z:/www/example.com"
or
Alias /foo "Z:/www/example.com"
For development purposes, you may just wish to run the built in webserver on whatever machine you are working on:
php -S localhost:8000
Upvotes: 1