Вопрос

I am using this URL shortener but I'm having a hard time setting it up. https://github.com/mathiasbynens/php-url-shortener

I've setup the database, changed the config file accordingly. I put the files in a subdirectory and removed Rewritebase from the .htaccess file.

I'm not sure what these two scripts mean if anyone could help? `## Favelets / Bookmarklets

Prompt

// js javascript:(function(){var%20q=prompt('URL:');if(q){document.location='http://yourshortener.ext/shorten?url='+encodeURIComponent(q)}}());

Shorten this URL

// js javascript:(function(){document.location='http://yourshortener.ext/shorten?url='+encodeURIComponent(location.href)}());

Это было полезно?

Решение

The scripts you're asking about are there so you can quickly create a Short URL from that page.

The prompt will ask you what URL you want to shorten, whilst the second one will automatically shorten the page you're already on.

Give them a go :)

Другие советы

If you Uploaded all files to your host then replace

http://yourshortener.ext/shorten?url=

With

http://Yourdomain.com/shorten?url=

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top