Файл .php не находит файл или каталог с тегами <link>или <script>html - PullRequest
0 голосов
/ 23 марта 2019

Всякий раз, когда я запускаю свой файл .php на atom как «начало в папке текущего файла», ссылка FullCalendar и файлы сценариев не могут быть найдены.Это делает так, чтобы календарь не загружался.Однако, если я преобразую файл в формат .html и просматриваю HTML, календарь загружается, и файлы можно найти.Я использую PHP и сеансы для передачи информации об именах из моего index.php файла в calendar.php файл.

Это журналы PHP Server:

[Fri Mar 22 17:08:22 2019] PHP Warning: PHP Sta
at line 0, file Unknownrtup: Unable to load dynamic library 'bz2' (tried: C:\php\ext\bz2 (The specified module could not be found.), C:\php\ext\php_bz2.dll (The specified module could not be found.))
at line 0, file Unknown[Fri Mar 22 17:08:22 2019] PHP Warning: PHP Startup: Unable to load dynamic library 'curl' (tried: C:\php\ext\curl (The specified module could not be found.), C:\php\ext\php_curl.dll (The specified module could not be found.))
at line 0, file Unknown[Fri Mar 22 17:08:22 2019] PHP Warning: PHP Startup: Unable to load dynamic library 'gd2' (tried: C:\php\ext\gd2 (The specified module could not be found.), C:\php\ext\php_gd2.dll (The specified module could not be found.))
at line 0, file Unknown[Fri Mar 22 17:08:22 2019] PHP Warning: PHP Startup: Unable to load dynamic library 'gettext' (tried: C:\php\ext\gettext (The specified module could not be found.), C:\php\ext\php_gettext.dll (The specified module could not be found.))
[Fri Mar 22 17:08:22 2019] PHP Warning: PHP Startup: Unab
at line 0, file Unknownle to load dynamic library 'gmp' (tried: C:\php\ext\gmp (The specified module could not be found.), C:\php\ext\php_gmp.dll (The specified module could not be found.))
at line 0, file Unknown[Fri Mar 22 17:08:22 2019] PHP Warning: PHP Startup: Unable to load dynamic library 'mbstring' (tried: C:\php\ext\mbstring (The specified module could not be found.), C:\php\ext\php_mbstring.dll (The specified module could not be found.))
at line 0, file Unknown[Fri Mar 22 17:08:22 2019] PHP Warning: PHP Startup: Unable to load dynamic library 'exif' (tried: C:\php\ext\exif (The specified module could not be found.), C:\php\ext\php_exif.dll (The specified module could not be found.))
at line 0, file Unknown[Fri Mar 22 17:08:22 2019] PHP Warning: PHP Startup: Unable to load dynamic library 'mysqli' (tried: C:\php\ext\mysqli (The specified module could not be found.), C:\php\ext\php_mysqli.dll (The specified module could not be found.))
at line 0, file Unknown[Fri Mar 22 17:08:22 2019] PHP Warning: PHP Startup: Unable to load dynamic library 'odbc' (tried: C:\php\ext\odbc (The specified module could not be found.), C:\php\ext\php_odbc.dll (The specified module could not be found.))
at line 0, file Unknown[Fri Mar 22 17:08:22 2019] PHP Warning: PHP Startup: Unable to load dynamic library 'openssl' (tried: C:\php\ext\openssl (The specified module could not be found.), C:\php\ext\php_openssl.dll (The specified module could not be found.))
at line 0, file Unknown[Fri Mar 22 17:08:22 2019] PHP Warning: PHP Startup: Unable to load dynamic library 'pdo_mysql' (tried: C:\php\ext\pdo_mysql (The specified module could not be found.), C:\php\ext\php_pdo_mysql.dll (The specified module could not be found.))
at line 0, file Unknown[Fri Mar 22 17:08:22 2019] PHP Warning: PHP Startup: Unable to load dynamic library 'pdo_odbc' (tried: C:\php\ext\pdo_odbc (The specified module could not be found.), C:\php\ext\php_pdo_odbc.dll (The specified module could not be found.))
at line 0, file Unknown[Fri Mar 22 17:08:22 2019] PHP Warning: PHP Startup: Unable to load dynamic library 'pdo_pgsql' (tried: C:\php\ext\pdo_pgsql (The specified module could not be found.), C:\php\ext\php_pdo_pgsql.dll (The specified module could not be found.))
at line 0, file Unknown[Fri Mar 22 17:08:22 2019] PHP Warning: PHP Startup: Unable to load dynamic library 'pdo_sqlite' (tried: C:\php\ext\pdo_sqlite (The specified module could not be found.), C:\php\ext\php_pdo_sqlite.dll (The specified module could not be found.))
at line 0, file Unknown[Fri Mar 22 17:08:22 2019] PHP Warning: PHP Startup: Unable to load dynamic library 'pgsql' (tried: C:\php\ext\pgsql (The specified module could not be found.), C:\php\ext\php_pgsql.dll (The specified module could not be found.))
at line 0, file Unknown[Fri Mar 22 17:08:22 2019] PHP Warning: PHP Startup: Unable to load dynamic library 'shmop' (tried: C:\php\ext\shmop (The specified module could not be found.), C:\php\ext\php_shmop.dll (The specified module could not be found.))
[Fri Mar 22 17:08:24 2019] 127.0.0.1:50835 [200]: /calendar.php
[Fri Mar 22 17:08:24 2019] 127.0.0.1:50836 [404]: /packages/core/main.css - No such file or directory
[Fri Mar 22 17:08:24 2019] 127.0.0.1:50837 [404]: /packages/daygrid/main.css - No such file or directory
[Fri Mar 22 17:08:24 2019] 127.0.0.1:50838 [404]: /packages/timegrid/main.css - No such file or directory
[Fri Mar 22 17:08:24 2019] 127.0.0.1:50839 [404]: /packages/list/main.css - No such file or directory
[Fri Mar 22 17:08:24 2019] 127.0.0.1:50840 [404]: /packages/core/main.js - No such file or directory
[Fri Mar 22 17:08:24 2019] 127.0.0.1:50841 [404]: /vendor/rrule.js - No such file or directory
[Fri Mar 22 17:08:24 2019] 127.0.0.1:50842 [200]: /css/modalstyle.css
[Fri Mar 22 17:08:24 2019] 127.0.0.1:50843 [404]: /packages/timegrid/main.js - No such file or directory
[Fri Mar 22 17:08:24 2019] 127.0.0.1:50844 [404]: /packages/daygrid/main.js - No such file or directory
[Fri Mar 22 17:08:24 2019] 127.0.0.1:50845 [404]: /packages/list/main.js - No such file or directory
[Fri Mar 22 17:08:24 2019] 127.0.0.1:50846 [404]: /packages/rrule/main.js - No such file or directory
[Fri Mar 22 17:08:24 2019] 127.0.0.1:50847 [404]: /packages/interaction/main.js - No such file or directory

Я не уверен, что естьэто лучший способ передачи информации.Можно ли вообще не использовать PHP, и если да, то как?Я довольно новичок в этих темах, поэтому, пожалуйста, объясните подробно с примерами.Спасибо !!

calendar.php код:

<?php
// Start the session
session_start();
?>

<!DOCTYPE html>
<html>

<head>
  <meta charset='utf-8' />

  <!-- Modal display files-->
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <link rel="stylesheet" href="css/modalstyle.css">

  <!-- FullCalendar packages -->
  <link href='../packages/core/main.css' rel='stylesheet' />
  <link href='../packages/daygrid/main.css' rel='stylesheet' />
  <link href='../packages/timegrid/main.css' rel='stylesheet' />
  <link href='../packages/list/main.css' rel='stylesheet' />
  <script src='../vendor/rrule.js'></script>
  <script src='../packages/core/main.js'></script>
  <script src='../packages/interaction/main.js'></script>
  <script src='../packages/daygrid/main.js'></script>
  <script src='../packages/timegrid/main.js'></script>
  <script src='../packages/list/main.js'></script>
  <script src='../packages/rrule/main.js'></script>

  <script>
    var isShowAll = true;
    var thisOwner = "Pranay Agrawal";
    var calendar = null;
    document.addEventListener('DOMContentLoaded', function() {
      // TODO turn PHP variable into javascript?
      var calendarEl = document.getElementById('calendar');

      calendar = new FullCalendar.Calendar(calendarEl, {
        plugins: ['interaction', 'dayGrid', 'timeGrid', 'list', 'rrule'],

        /*The bar on the top of the calendar for navigation*/
        header: {
          /*left: 'prev,next today',*/
          left: 'myEvents, today',
          center: 'title',
          right: 'timeGridOneWeek,timeGridDay,listWeek',

        },
        customButtons: {
          myEvents: {
            text: 'My Events Only',
            click: function() {

            }
          }
        },

        /*Custom views*/
        views: {
          timeGridOneWeek: {
            type: 'timeGrid',
            duration: {
              days: 7
            },
            buttonText: 'week'
          },
          listWeek: {
            duration: {
              days: 7
            }
          }
        },

        /*Could be used to set certain times for some weeks*/
        /*businessHours: [ // specify an array instead
          {
            daysOfWeek: [1, 2, 3, 4, 5], // Monday, Tuesday, Wednesday
            startTime: '08:00', // 8am
            endTime: '22:30' // 6pm
          },
          {
            daysOfWeek: [6, 7], // Thursday, Friday
            startTime: '10:00', // 10am
            endTime: '16:00' // 4pm
          }
        ],*/

        slotLabelInterval: {hours: 1}, //slots labeled by one hour
        selectOverlap: false, //user not allowed to "select" periods of times that are occupied by events
        defaultView: 'timeGridOneWeek', //start on week view
        slotDuration: '00:15:00', //each hour is split into 15 minutes
        minTime: "06:00:00", //start day 6am
        maxTime: '23:00:00', //end day 11pm
        scrollTime: '11:30:00', //start view at 11:30am?
        allDaySlot: false, //cannot make allday events
        nowIndicator: true, //red bar that shows current time
        navLinks: true, // can click day/week names to navigate views
        weekNumbersWithinDays: true, //styling week numbers in dayGrid view
        eventLimit: true, // allow "more" link when too many events

        events: [{
            title: 'All Day Event',
            start: '2019-02-01'
          },
          {
            title: 'Long Event',
            start: '2019-02-07',
            end: '2019-02-10'
          },
          {
            groupId: 999,
            id: 2,
            title: 'Repeating Event',
            start: '2019-02-09T16:00:00'
          },
          {
            groupId: 999,
            id: 2,
            title: 'Repeating Event',
            start: '2019-02-16T16:00:00'
          },
          {
            title: 'Conference',
            id: 2,
            start: '2019-02-11',
            end: '2019-02-13'
          },
          {
            title: 'Dunkin\' Donuts',
            start: '2019-03-17T10:30:00',
            end: '2019-03-17T11:15:00',
            color: '#800080'
          },
          {
            title: 'AppleBee\'s',
            start: '2019-03-22T15:00:00',
            end: '2019-03-22T16:30:00',
            location: 'The Arena',
            color: '#ff0000',
            //  rendering: 'background', (may be useful for add event, turn all events to invert background to show not available)
            description: 'Big Event',
            owner: 'Pranay Agrawal'
          },
          {
            title: 'Mellow Mushroom',
            start: '2019-03-19T13:30:00',
            color: '#cc3300'
          },
          {
            title: 'India Oven',
            start: '2019-03-20T16:30:00',
            color: '#cc9900'
          },
          {
            title: 'Thai Thai',
            start: '2019-03-21T12:00:00',
            color: '#669900'
          },
          {
            title: 'Birthday Party',
            start: '2019-02-13T07:00:00'
          },
          {
            title: 'Click for Google',
            url: 'http://google.com/',
            start: '2019-02-24T12:05:00'
          },
          {
            title: 'Free Pizza',
            allday: 'false',
            borderColor: "#5173DA",
            color: '#99ABEA',
            location: '3rd Floor Boys',
            textColor: "#000000",
            description: "<p>This is just a fake description for the Free Pizza.</p><p>Nothing to see!</p>",
            start: '2019-03-23T12:05:00',
            end: '2019-03-23T12:55:00',
            owner: 'Jason Tran'
            //url:"http://www.mikesmithdev.com/blog/worst-job-titles-in-internet-and-info-tech/"
          }
        ],

      eventRender: function(info) {
        if(isShowAll) { //show all events
          return true;
        }
        else if(info.event.extendedProps.owner!=thisOwner) { //if an event is not the owner's, remove it from display!
          return false;
        }
      },

        eventClick: function(info) {
          //info.el.style.borderColor = 'red'
        //  window.alert(allEvents[2].title);
        //  window.alert(myEvents);

          /* Change modal html text dependent on event information*/
          document.getElementById("myTitle").innerHTML = info.event.title;
          document.getElementById("myLoc").innerHTML = info.event.extendedProps.location;
          document.getElementById("myDesc").innerHTML = info.event.extendedProps.description;
          document.getElementById("myTime").innerHTML = info.event.start + " - " + info.event.end;

          /* Functionality for displaying and removing modal on click*/
          var modal = document.getElementById('myModal');
          var span = document.getElementsByClassName("close")[0];
          modal.style.display = "block"; //show the modal display
          span.onclick = function() {
            modal.style.display = "none";
          }
          window.onclick = function(event) {
            if (event.target == modal) {
              modal.style.display = "none";
            }
          }

        }
      });
      calendar.render();
    });

  function myEventFunc() {

    var checkBox = document.getElementById("myCheck");
      if (checkBox.checked == true){
        isShowAll=false;
      } else {
        isShowAll=true;
      }
    //  window.alert("myEventFunc called: " + isShowAll);
      calendar.rerenderEvents();

    }

  </script>

  <style>
    body {
      margin: 40px 10px;
      padding: 0;
      font-family: "Lucida Grande", Helvetica, Arial, Verdana, sans-serif;
      font-size: 14px;
    }

    #calendar {
      max-width: 900px;
      margin: 0 auto;
    }

    /* cursor pointer when hovering events */
    .fc-event,
    .fc-list-item {
      cursor: pointer;
    }

    .e1Div {
    color: #000;
    float: left;
    display: inline-block;
    padding: 8px;
    margin-right: 10px;
    background-color: #f5f5f5;
    background-image: -moz-linear-gradient(top, #ffffff, #e6e6e6);
    background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#ffffff), to(#e6e6e6));
    background-image: -webkit-linear-gradient(top, #ffffff, #e6e6e6);
    background-image: -o-linear-gradient(top, #ffffff, #e6e6e6);
    background-image: linear-gradient(to bottom, #ffffff, #e6e6e6);
    background-repeat: repeat-x;
    border-color: #e6e6e6 #e6e6e6 #bfbfbf;
    border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
    color: #333;
    text-shadow: 0 1px 1px rgba(255, 255, 255, 0.75);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05);

    }

  </style>
</head>

<body>

<?php
  print_r($_SESSION);
?>
  <!-- <button class="e1Div" type="button" id="myCheck" onClick="myEventFunc()"/>
    My Events Only
  </button> -->

<div class="e1Div">
    <input type="checkbox" id="myCheck" onClick="myEventFunc()" />
    <label for="e1">My Events Only</label>

</div>

  <div id='calendar'></div>

  <!-- The Modal -->
  <div id="myModal" class="modal">

    <!-- Modal content -->
    <div class="modal-content">
      <div class="modal-header">
        <span class="close">&times;</span>
        <h2 id='myTitle'>Modal Header</h2>
      </div>
      <div class="modal-body">
        <p id='myTime'>Some text in the Modal Body</p>
        <p id='myDesc'>Some other text...</p>
      </div>
      <div class="modal-footer">
        <h3 id='myLoc'>Modal Footer</h3>
      </div>
    </div>

  </div>
</body>  

Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...