Skip to main content
Participant
August 6, 2015
Answered

xampp is replacing the actual php as follow:

  • August 6, 2015
  • 1 reply
  • 493 views

ORINGINAL FILE:

<?php require_once("../includes/initialize.php"); ?>

<?php

  // 1. the current page number ($current_page)

  $page = !empty($_GET['page']) ? (int)$_GET['page'] : 1;

  // 2. records per page ($per_page)

  $per_page = 3;

  // 3. total record count ($total_count)

------------------------------------------------------------------

IS BEING REPLACE WITH THIS!

<?php require_once("file:///C|/xampp/htdocs/includes/initialize.php"); ?>

L******************************************************************************

<?php

  // 1. the current page number ($current_page)

  $page = !empty($_GET['page']) ? (int)$_GET['page'] : 1;

  // 2. records per page ($per_page)

  $per_page = 3;

  // 3. total record count ($total_count)

  $total_count = Photograph::count_all();

  // Find all photos

  // use pagination instead

  //$photos = Photograph::find_all();

  $pagination = new Pagination($page, $per_page, $total_count);

  // Instead of finding all records, just find the records

  // for this page

  $sql = "SELECT * FROM photographs ";

  $sql .= "LIMIT {$per_page} ";

  $sql .= "OFFSET {$pagination->offset()}";

  $photos = Photograph::find_by_sql($sql);

This topic has been closed for replies.
Correct answer Rob Hecker2

No, XAMPP isn't doing this. More likely Dreamweaver, but only because your site isn't set up correctly.

1 reply

Rob Hecker2
Rob Hecker2Correct answer
Legend
August 6, 2015

No, XAMPP isn't doing this. More likely Dreamweaver, but only because your site isn't set up correctly.

eddwinAuthor
Participant
August 6, 2015

how can i correct it? the problem start with window 10