php 代码审查样本1

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了php 代码审查样本1相关的知识,希望对你有一定的参考价值。

<?php

if( isset( $_POST[ 'Upload' ] ) ) {
	// Where are we going to be writing to?
	$target_path  = DVWA_WEB_PAGE_TO_ROOT . "hackable/uploads/";
	$target_path .= basename( $_FILES[ 'uploaded' ][ 'name' ] );

	// Can we move the file to the upload folder?
	if( !move_uploaded_file( $_FILES[ 'uploaded' ][ 'tmp_name' ], $target_path ) ) {
		// No
		$html .= '<pre>Your image was not uploaded.</pre>';
	}
	else {
		// Yes!
		$html .= "<pre>{$target_path} succesfully uploaded!</pre>";
	}
}

?>

以上是关于php 代码审查样本1的主要内容,如果未能解决你的问题,请参考以下文章

php 代码审查样本4

php 代码审查样本3

php 代码审查样本2

markdown PHP代码审查指南

php注册审查

请教各位大神,Macbook怎么查询源代码或审查元素