Jump to content

Typical society in the Telegram - This is the backup site feed forum.losper.net

Mass debate, problem-solving, assistance, support and a wonderful community ...

You can upload files in the Telegram channel and share link on the forum "Typical society."

This method helps to avoid broken links in the future and the loss of files on the site!

Important events on the site, you'll also find in our Telegram channel ...

Share your experiences with others, help, be responsive, friendly and communicate with other users.

Типичный Социум
Create New...
  • В данном разделе "Код и Алгоритмы", Вы можете поделится с остальными пользователями своим Кодом или разработанным, новым Алгоритмом.

    Публикуйте свой код или Алгоритм, для его обсуждения, оценки или совместной разработки и улучшения кода или алгоритма, в подходящем для этого разделе.

  • Тестовый код на PHP

       (0 reviews)

    AndrewPro
    • Programming language: PHP
     Share

    public function site_url($uri = '', $protocol = NULL)
    	{
    		$base_url = $this->slash_item('base_url');
    
    		if (isset($protocol))
    		{
    			// For protocol-relative links
    			if ($protocol === '')
    			{
    				$base_url = substr($base_url, strpos($base_url, '//'));
    			}
    			else
    			{
    				$base_url = $protocol.substr($base_url, strpos($base_url, '://'));
    			}
    		}
    
    		if (empty($uri))
    		{
    			return $base_url.$this->item('index_page');
    		}
    
    		$uri = $this->_uri_string($uri);
    
    		if ($this->item('enable_query_strings') === FALSE)
    		{
    			$suffix = isset($this->config['url_suffix']) ? $this->config['url_suffix'] : '';
    
    			if ($suffix !== '')
    			{
    				if (($offset = strpos($uri, '?')) !== FALSE)
    				{
    					$uri = substr($uri, 0, $offset).$suffix.substr($uri, $offset);
    				}
    				else
    				{
    					$uri .= $suffix;
    				}
    			}
    
    			return $base_url.$this->slash_item('index_page').$uri;
    		}
    		elseif (strpos($uri, '?') === FALSE)
    		{
    			$uri = '?'.$uri;
    		}
    
    		return $base_url.$this->item('index_page').$uri;
    	}

     

     Share


    User Feedback

    There are no reviews to display.


×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.Privacy Policy

Search In
  • More options...
Find results that contain...
Find results in...

Write what you are looking for and press enter or click the search icon to begin your search

-->