Differences
This shows you the differences between the selected revisions of the page.
2006-07-11 | 2006-07-11 | ||
fixed my mistake :-( (63.235.201.76) | reorganize the last addition (martin) | ||
Line 32: | Line 32: | ||
str_replace("home/user/public_html", "~user", "'`pwd`'"). | str_replace("home/user/public_html", "~user", "'`pwd`'"). | ||
"/!\n"?>' | php -q</code> | "/!\n"?>' | php -q</code> | ||
- | |||
- | This one works if php is unavailable. | ||
- | |||
- | <code>echo 'http://www.example.com'`pwd`'!' | sed s#home/lgtngstk/public_html#~user#</code> | ||
Hints: | Hints: | ||
Line 43: | Line 39: | ||
* 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). | * 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`'%%''. | * 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`'%%''. | ||
- | ===== Level 2 Headline ===== | + | |
+ | Another example using shell comand only, in case PHP is unavailable. | ||
+ | |||
+ | <code>echo 'http://www.example.com'`pwd`'!' | sed s#home/lgtngstk/public_html#~user#</code> | ||
===== Templates ===== | ===== Templates ===== | ||
cp /path/to/template.html "!?&New HTML file:?!" | cp /path/to/template.html "!?&New HTML file:?!" |