dongshi3361 2015-11-05 20:07
浏览 35
已采纳

基金会不在php localhost连接中工作

I can connect to my php file and display it in my web browser via apache on mac and then http://localhost/~username/file.php but when I do it does not recognize any syntax that is zurb-foundation related. The webpage looks completely different than if I look at it locally as html, not connecting through this server.

I'm not sure if this is also relevant, but I've tried displaying the file with my foundation-5 folder either initially on my desktop, then in the sites folder, then in the sites folder with the php file within the foundation-5 folder. This last option displayed a 403 forbidden error "You don't have permission to access /~username/foundation-5/sample.php on this server. Server unable to read htaccess file, denying access to be safe"

Below is my code.

<?php

    $link = mysql_connect('127.0.0.1', 'root', '$password');
    if (!$link) {
        die('Could not connect: ' . mysql_error());
    }
    echo 'Connected successfully';

    mysql_close($link);

?>

<head>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Database</title>
    <link rel="stylesheet" href="css/foundation.css" />
    <script src="js/vendor/modernizr.js"></script>
</head>
<style>
    body {
        background-color: ;
    }
</style>
<body>

    <style>
        h1 {
            text-align: center;
        }
        h3 {
            text-align: center;
        }
        h5 {
            text-align: center;
        }
    </style>

    <div class="row">
        <div class="large-12 columns">
            <h1>Welcome!</h1>
            <hr/>
        </div>
    </div>

    <div class="row">

        <div class="large-3 medium-3 columns">
            <div class="panel">
                <h5>Jump To:</h5><br/>
                <a href="#User" class="small radius button">User Queries</a>
                <a href="http://foundation.zurb.com/docs/" class="small radius button">Link</a>
            </div>
        </div>

        <div class="large-9 columns">
            <div class="panel">

                <a name="User"> <h3>User Queries</h3><br/></a>

                <div class="row">
                    <div class="large-12 columns">
                        <div class="callout panel">
                            <p><a href="http://foundation.zurb.com/docs"><strong>Query 1</strong></a><br/>Query 1 Description</p>
                        </div>
                    </div>
                </div>
                <div class="row">
                    <div class="large-12 columns">
                        <div class="callout panel">
                            <p><a href="http://foundation.zurb.com/docs"><strong>Query 2</strong></a><br/>Query 2 Description</p>
                        </div>
                    </div>
                </div>
                <div class="row">
                    <div class="large-12 columns">
                        <div class="callout panel">
                            <p><a href="http://foundation.zurb.com/docs"><strong>Query 3</strong></a><br/>Query 3 Description</p>
                        </div>
                    </div>
                </div>
                <div class="row">
                    <div class="large-12 columns">
                        <div class="callout panel">
                            <p><a href="http://foundation.zurb.com/docs"><strong>Query 4</strong></a><br/>Query 4 Description</p>
                        </div>
                    </div>
                </div>

                <hr/>

            </div>
        </div>
    </div>

<script src="foundation-5/js/vendor/jquery.js"></script>
<script src="foundation-5/js/foundation.min.js"></script>
<script>
  $(document).foundation();
</script>
  • 写回答

1条回答 默认 最新

  • dougou7782 2015-11-05 23:12
    关注

    Solved. Had to give my foundations-5 folder 755 permissions -- incase anyone else has this problem.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 乘性高斯噪声在深度学习网络中的应用
  • ¥15 运筹学排序问题中的在线排序
  • ¥15 关于docker部署flink集成hadoop的yarn,请教个问题 flink启动yarn-session.sh连不上hadoop,这个整了好几天一直不行,求帮忙看一下怎么解决
  • ¥30 求一段fortran代码用IVF编译运行的结果
  • ¥15 深度学习根据CNN网络模型,搭建BP模型并训练MNIST数据集
  • ¥15 C++ 头文件/宏冲突问题解决
  • ¥15 用comsol模拟大气湍流通过底部加热(温度不同)的腔体
  • ¥50 安卓adb backup备份子用户应用数据失败
  • ¥20 有人能用聚类分析帮我分析一下文本内容嘛
  • ¥30 python代码,帮调试,帮帮忙吧