thanks.php 1.1 KB

12345678910111213141516171819202122232425262728293031323334
  1. <?php
  2. header("Content-Type:text/html; charset=utf-8");
  3. // Check for a degraded file upload, this means SWFUpload did not load and the user used the standard HTML upload
  4. $used_degraded = false;
  5. $resume_id = "";
  6. if (isset($_FILES["resume_degraded"]) && is_uploaded_file($_FILES["resume_degraded"]["tmp_name"]) && $_FILES["resume_degraded"]["error"] == 0) {
  7. $resume_id = $_FILES["resume_degraded"]["name"];
  8. $used_degraded = true;
  9. }
  10. // Check for the file id we should have gotten from SWFUpload
  11. if (isset($_POST["hidFileID"]) && $_POST["hidFileID"] != "" ) {
  12. $resume_id = $_POST["hidFileID"];
  13. }
  14. ?>
  15. <?php
  16. //sleep(3);
  17. //表单数据是以POST方式提交过来;
  18. //$name=$_POST["name"];
  19. //注意json数据必须严格按如下格式输出:{"info":"demo info","status":"y"};
  20. //info: 输出提示信息;
  21. //status: 返回提交数据的状态,是否提交成功。"y"表示提交成功,"n"表示提交失败,在callback函数里可以根据该值执行相应的回调操作;
  22. echo '{
  23. "info":"用户名:'.htmlspecialchars($_POST["name"]).' - 附件:'.htmlspecialchars($_POST["hidFileID"]).'",
  24. "status":"y"
  25. }';
  26. //echo '{"info":"'.$name.'","status":"y"}';
  27. ?>