| Server IP : 38.180.95.123 / Your IP : 216.73.216.230 Web Server : nginx/1.28.2 System : Linux v970193243.local 6.8.0-134-generic #134-Ubuntu SMP PREEMPT_DYNAMIC Fri Jun 26 18:43:11 UTC 2026 x86_64 User : playbazecasino.com ( 1013) PHP Version : 8.4.23 Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority, MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : OFF Directory : /usr/share/doc/php-phpmyadmin-shapefile/examples/ |
Upload File : |
<?php
declare(strict_types=1);
/**
* phpMyAdmin ShapeFile library
* <https://github.com/phpmyadmin/shapefile/>.
*
* Copyright 2006-2007 Ovidio <ovidio AT users.sourceforge.net>
* Copyright 2016 - 2017 Michal Čihař <michal@cihar.com>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, you can download one from
* https://www.gnu.org/copyleft/gpl.html.
*/
use PhpMyAdmin\ShapeFile\ShapeFile;
/**
* Displays content of given file.
*
* @param string $filename File to open
*/
// phpcs:ignore Squiz.Functions.GlobalFunction.Found
function display_file(string $filename): void
{
$shp = new ShapeFile(1);
$shp->loadFromFile($filename);
$i = 1;
foreach ($shp->records as $i => $record) {
echo '<pre>';
echo 'Record No. ' . $i . ':' . "\n\n\n";
// All the data related to the record
echo 'SHP Data = ';
print_r($record->shpData);
print_r("\n\n\n");
// All the information related to each record
echo 'DBF Data = ';
print_r($record->dbfData);
print_r("\n\n\n");
echo '</pre>';
}
echo 'The ShapeFile was completely read.<br>' . "\n";
echo 'Return to the <a href="index.php">index</a>.';
}