Question

I'm developing a portal for (local) developers, and would like to make it possible to open PHP-files directly from the browser in PHPEd, by passing their name om the hard disk.

I've found two solutions, but couldn't get them to work:

  • Solution 1: create a new protocol (phped_protocol) and use "phped_protocol://[file]" as URI
  • Solution 2: execute a batch script that opens PHPEd

Could someone help me out with one of these solutions? I want to know how to open a PHP-file using PHPEd, via PHP/browser.

== Edit ==

Solution 1

test.reg

REGEDIT4

[HKEY_CLASSES_ROOT\phped_protocol] 
@="URL:phpedProtocol" 
"URL Protocol"="" 

[HKEY_CLASSES_ROOT\phped_protocol\shell] 

[HKEY_CLASSES_ROOT\phped_protocol\shell\open] 

[HKEY_CLASSES_ROOT\phped_protocol\shell\open\command] 
@="\"C:\\phped_protocol.bat\" \"%1\""

test.html

<a href="phped_protocol://[file]">Open file</a>

Solution 2

phped_protocol.bat

START "test" "C:\Program Files (x86)\NuSphere\PhpED\7.0\phped.exe"
EXIT

test.php

system('CMD /C C:\phped_protocol.bat');
Was it helpful?

Solution

Our current solution is a listener and a database. PHP inserts a record in the database. When the listeners finds it, it wil open the file.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top