Differences
This shows you the differences between the selected revisions of the page.
2005-06-28 | 2005-08-11 | ||
missing accelerator in prompt (martin) | URL Address of Selected File (martin) | ||
Line 10: | Line 10: | ||
unzip "!" | unzip "!" | ||
+ | |||
+ | ===== [[url]] URL Address of Selected File ===== | ||
+ | |||
+ | Example shows how to launch simple PHP script that maps file path to URL. | ||
+ | |||
+ | <code>echo '<?="http://www.example.com". | ||
+ | str_replace("home/user/public_html", "~user", "'`pwd`'"). | ||
+ | "/!\n"?>' | php -q</code> | ||
+ | |||
+ | Hints: | ||
+ | |||
+ | * Note that the above should be entered as one line! | ||
+ | * Do not forget to check custom command option //Show results in terminal//, otherwise you will not see the results. You may also want to use the command for directories, check //Apply to directories// too. | ||
+ | * For your particular use, just replace ''%%http://www.example.com%%'' with right URL prefix, ''home/user/public_html'' with right path prefix and ''~user'' with right URL replacement (it can even be empty in some cases). | ||
+ | * If you do mapping like above, i.e. for server containing multiple user's homepages, you can make it universal by replacing ''user'' with ''%%'`whoami`'%%''. | ||
===== Templates ===== | ===== Templates ===== | ||
cp /path/to/template.html "!?&New HTML file:?!" | cp /path/to/template.html "!?&New HTML file:?!" | ||
+ | |||
+ |