| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 2685 人关注过本帖
标题:我要用php读取 C:\phpStudy\PHPTutorial\WWW\user_info 文件夹里面的图片并 ...
取消只看楼主 加入收藏
qzx10010
Rank: 1
等 级:新手上路
帖 子:11
专家分:0
注 册:2018-9-7
收藏
 问题点数:0 回复次数:0 
我要用php读取 C:\phpStudy\PHPTutorial\WWW\user_info 文件夹里面的图片并显示在页面上去
$.ajax({
        type:"post",
        url:"blogs_showpics_href.php",
        data:datas,
        dataType:"json",
        success:function(result){
            alert(result);
        },
        error:function(){
            alert("内部服务器错误");
        }
    });




<?php
    $a = $_POST['ids'];
    $hostdir = dirname(__FILE__)."phpStudy\PHPTutorial\WWW\user_info\photo\ $a";
    $url = "phpStudy\PHPTutorial\WWW\user_info\photo\ $a";
    $filesnames = scandir($hostdir);
    print_r ($filesnames);
//    $www = 'http://www.***.com/';
//    foreach($filesnames as $name){
//        $aurl= "<img width='100' height='100' src='"$url."10.jpg"."' alt = '".$name."'>"
//    }
//    echo $filesnames;
    echo json_encode($hostdir);
?>


为什么老是执行不成功啊
搜索更多相关主题的帖子: php 读取 显示 页面 url 
2018-11-04 10:18
快速回复:我要用php读取 C:\phpStudy\PHPTutorial\WWW\user_info 文件夹里面的图 ...
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.085569 second(s), 9 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved