
写到数据库:
$filepath = $_FILES[“uploadfile”][“name”];
$formdata=$_FILES[“uploadfile”][“tmp_name”];
$filedata = addslashes(fread(fopen($formdata,”r”),filesize($formdata)));
$newid=TSMLDB::getInstance()->insert_attachmnt_all($id, $filepath,$filedata);
写到文件:
move_uploaded_file($formdata, iconv(“utf-8”, “gb2312”, “uploads/”.$filepath));
两种取值方式:
$_POST 与 php://input可以取到值,$HTTP......
作者: owoer
|
发表于:2012年10月16日
|
栏目:PHP
|
PHP上传文件 保存到文件夹或数据库已关闭评论
阅读全文

JS代码
<script type="text/javascript">
function changeappid(){
var appid=document.getElementById("appid").value;
<?php
$result = TSMLDB::getInstance()->select_sql("select f.appid,t.ftypeid,t.typename from wfappform f join wfformtype t on f.ftypeid=t.ftypeid");
$apptype = array();
while ($row = mysqli_fetch_array($result)):
$apptype[] =$row ;
endwhile;
mysqli_free_result($result);
$appcount=count($apptype);
?>
document.app......
作者: owoer
|
发表于:2012年10月16日
|
栏目:PHP
|
php mysql js 下拉框 二级联动已关闭评论
阅读全文

PHP程序员突破成长瓶颈?
(整理于网上,并自己也在逐条实施中)对PHP的掌握不精(很多PHP手册都没有看完,库除外);知识面比较窄(面对需求,除开使用PHP和MySQL,不知道其它的解决办法);PHP代码以过程为主,认为面向对象的实现太绕;看不懂这些 PHPer 在遇到需要高性能、处理高并发、大量数据的项目或业务逻辑比较复杂(系统需要解决多领域业务的问题)时,缺少思路。不能分析问题的本质,技术判断力比较差,对于问题较快能找出临时的解决办法,但常常在不断临时性的解决办法中,系统和自己一步步走向崩溃。那怎么提高自己呢?怎么可......
作者: owoer
|
发表于:2012年10月10日
|
栏目:分享
|
PHP程序猿突破成长已关闭评论
阅读全文

Employees need to access their email from wherever they happen to be – on the road, at customer sites, remote offices, and at home. WebMail clients allows receiving and sending email messages using POP3 and SMTP protocols through both local and remote mail servers. Providing secure filtering of unsafe content while viewing HTML-formatted email messages. WebMail clients can operate under different popular web platforms (PHP, ASP.NET, ruby on rails, java).
Today i wanted to share with you 10......
作者: owoer
|
发表于:2012年10月6日
|
栏目:办公应用
|
10个基于AJAX和PHP的邮件客户端已关闭评论
阅读全文

简便方法:
echo date(“Y”,time()); //年
echo date(“n”,time()); //月
echo date(“j”,time()); //日
参考:
//取得时间的年月日
function getyear($date)
{
$strtime = $date;
$strtimes = explode(” “,$strtime);
$timearray = explode(“-“,$strtimes[0]);
echo $year = $timearray[0];
echo $month = $timearray[1];
echo $day = $timearray[2];
}
//取得星期
echo date(“Y年m月d日l”,time());
$date = date(“Y年m月d日”,time());
switch(......