Failed to save the file to the "xx" directory.

Failed to save the file to the "ll" directory.

Failed to save the file to the "mm" directory.

Failed to save the file to the "wp" directory.

403WebShell
403Webshell
Server IP : 66.29.132.124  /  Your IP : 3.147.56.125
Web Server : LiteSpeed
System : Linux business141.web-hosting.com 4.18.0-553.lve.el8.x86_64 #1 SMP Mon May 27 15:27:34 UTC 2024 x86_64
User : wavevlvu ( 1524)
PHP Version : 7.4.33
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /home/wavevlvu/tacafoundation.org/wp-content/plugins/give/src/Framework/Views/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /home/wavevlvu/tacafoundation.org/wp-content/plugins/give/src/Framework/Views/View.php
<?php

namespace Give\Framework\Views;

use InvalidArgumentException;

/**
 * Helper class responsible for loading views.
 */
class View
{
    /**
     * Default domain
     */
    const DEFAULT_DOMAIN = 'FormBuilder';

    /**
     * @since 3.0.0
     *
     * @param  array  $templateParams  Arguments for template.
     * @param  bool  $echo
     *
     * @param  string  $view  Template name
     * When using multiple domains within this plugin, the domain directory can be set by using "." in the template name.
     * String before the "." character is domain directory, and everything after is the template file path
     * Example usage: View::render( 'DomainName.templateName' );
     * This will try to load src/DomainName/resources/view/templateName.php file
     *
     * @return string|void
     * @throws InvalidArgumentException if template file not exist
     *
     */
    public static function load($view, $templateParams = [], $echo = false)
    {
        // Get domain and file path
        list ($domain, $file) = static::getPaths($view);
        $template = GIVE_PLUGIN_DIR . "src/{$domain}/resources/views/{$file}.php";

        if ( ! file_exists($template)) {
            throw new InvalidArgumentException("View template file {$template} does not exist");
        }

        ob_start();
        extract($templateParams);
        include $template;
        $content = ob_get_clean();

        if ( ! $echo) {
            return $content;
        }

        echo $content;
    }

    /**
     * @since 3.0.0
     *
     * @param  array  $vars
     *
     * @param  string  $view
     */
    public static function render($view, $vars = [])
    {
        static::load($view, $vars, true);
    }

    /**
     * Get domain and template file path
     *
     * @since 3.0.0
     *
     * @param  string  $path
     *
     * @return array
     */
    private static function getPaths($path)
    {
        // Check for . delimiter
        if (false === strpos($path, '.')) {
            return [
                self::DEFAULT_DOMAIN,
                $path,
            ];
        }

        return explode('.', $path, 2);
    }
}

Youez - 2016 - github.com/yon3zu
LinuXploit