AI编程助手
AI免费问答

php上传图片获取路径及给表单字段赋值的方法,_PHP教程

  2016-07-12 09:00   804浏览 原创

php上传图片获取路径及给表单字段赋值的方法,

本文实例讲述了php上传图片获取路径及给表单字段赋值的方法。分享给大家供大家参考,具体如下:

1. 调用方法例子:

大图路径:

<input type="text" name="bigImageURL" id="bigImageURL" value=""><iframe src="uppic.php?id=bigImageURL" width="600" height="25" frameborder="0" scrolling="no"></iframe>

小图路径:

<input type="text" name="smallImageURL" id="smallImageURL" value=""><iframe src="uppic.php?id=smallImageURL" width="600" height="25" frameborder="0" scrolling="no"></iframe>

2. uppic.php





<title>图片上传</title><meta http-equiv="Content-Type" content="text/html; charset=gb2312"><meta content="MSHTML 6.00.3790.4275" name="GENERATOR"><style type="text/css">
<!--
input{border-width:1px;border:1px solid #bdbcbd;padding:3px 0 3px 5px;}
.inputbut{padding-left:3px;padding-right:2px;border:1px solid #bdbcbd;background:#FFF url(../images/inputbut_bg.gif) left center repeat-x;font-size:12px;height:24px;}
-->
</style><script language="javascript">
function check() 
{
 var strFileName=document.form.strPhoto.value;
 if (strFileName=="")
 {
   alert("璇烽</script>

php免费学习视频:立即学习
踏上前端学习之旅,开启通往精通之路!从前端基础到项目实战,循序渐进,一步一个脚印,迈向巅峰!

声明:本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系admin@php.cn核实处理。