Ver Mensaje Individual
  #3 (permalink)  
Antiguo 08/02/2013, 09:18
escar_matrix
 
Fecha de Ingreso: febrero-2013
Mensajes: 3
Antigüedad: 11 años, 10 meses
Puntos: 0
Respuesta: Problema con los includes en mi web

adminPosts.php
<?php

require 'header-admin.php';
require("../includes/classes/Post.php");
require("../includes/classes/PostDAL.php");

$numTotalAllPost = '0';
//$query = "SELECT * FROM posts";

?>
<div class="container-fluid">
<div class="row-fluid">
<?php
include ('sidebar-admin.php');
sidebarAdmin("sidebarAdmin-posts");
?>
<div class="span10">
<form action="">
<div class="row-fluid"> <!--/row-->
<h4>
<img src="http://www.forosdelweb.com/f18/includes/images/admin/icons/iconAdmin-posts.png"> Posts
<button type="button" class="buttonAddImage">
<a href="admin-posts-addNew.php">Add New</a>
</button>
</h4>
</div><!--/row-->

<div class="row-fluid"> <!--/row-->
<a href="#">Alls </a>(<?php echo $numTotalAllPost; ?>) |
<a href="#">Published </a>(<?php echo $numTotalAllPost; ?>) |
<a href="#">Drafts </a>(<?php echo $numTotalAllPost; ?>) |
<a href="#">Trash </a>(<?php echo $numTotalAllPost; ?>)
<div style="float:right">
Search: <input class="inputSearchAdmin" type="search" name="search"><input class="inputButton" type="submit">
</div>
</div><!--/row-->

<div class="row-fluid"> <!--/row FILTER-->
<div style="float:left">
<select name="actions" class="selectFilter">
<option value="volvo" selected>Edit</option>
<option value="saab">Delete</option>
</select>
<input class="inputButton" type="button" value="Apply">
</div>

<div style="float:left">
<select name="dates" style="width:130px" class="selectFilter">
<option value="volvo" selected>Show all dates</option>
<option value="saab">Delete</option>
</select>
<input class="inputButton" type="button" value="Filter">
</div>

<div style="float:right">
<input type="image" src="../includes/images/admin/icons/iconList.png">
<input type="image" src="../includes/images/admin/icons/iconListShow.png">
</div>
</div><!--/row FILTER-->

<div class="row-fluid">
<table class="table">
<thead>
<tr>
<th></th>
<th>id</th>
<th>author</th>
<th>Title</th>
<th>Excerpt</th>
<th>Nº Comments</th>
<th>DATE</th>
<th>Thumbnail</th>
<th>ThumbnailTitle</th>
</tr>
</thead>
<tbody>
<?php
$postDAL = new PostDAL();
$listPosts = $postDAL->get_posts_from_blog();

for($c=0; $c<sizeof($listPosts); $c++)
{
$post = new Post();
$post = $listPosts[$c];
?>
<tr>
<td></td>
<td><?php echo $post->getIdPost(); ?></td>
<td>Rammohan </td>
<td>Prueba 1</td>
<td>Esto es la pruena mumero 1 del primer post que hago.</td>
<td>4</td>
<td>10 Mar 2013<br>Published</td>
<td>/uploads/posts/imagePost1.png</td>
<td>imagePost1</td>
</tr>
<?php } ?>
</tbody>
</table>
</div><!--/row-->
<div class="row-fluid">

</div><!--/row-->
</form>
</div><!--/span-->
</div><!--/row-->

<hr>

<footer>
<p>&copy; Company 2012</p>
</footer>

</div><!--/.fluid-container-->
<?php
/*include ('sidebar-admin.php');
sidebarAdmin("sidebarAdmin-posts");
$numTotalAllPost = '0';
?>
<div class="span9">
<div id="contentAdmin">
<div class="span-Total">
<h4>
<img src="http://www.forosdelweb.com/f18/includes/images/admin/icons/iconAdmin-posts.png"> Posts
<button type="button" class="buttonAddImage">
<a href="admin-posts-addNew.php">Add New</a>
</button>
</h4>

<div class="row1">
<div class="span6-Total">
Alls <?php echo $numTotalAllPost; ?> |
Title
<input type="text" name="title" size="120">
</div>
<div class="span5-Total">
Buscar
<input type="text" name="title" size="120">
</div>
</div>

<div class="row3">
<div class="spanFull-Total">

</div>
</div>
</div>
</div>
</div>*/
?>
<!-- end #contentAdmin -->
<div style="clear: both;">&nbsp;</div>
<?php require 'footer-admin.php'; ?>

En el archivo blog.php me explota en las primeras lineas donde llama a PostDAL.php, y el explorador me indica lo siguiente:

Warning: include(../includes/config/connect.php): failed to open stream: No such file or directory in C:\xampp\htdocs\javierescartin.com\includes\classe s\PostDAL.php on line 9

Warning: include(): Failed opening '../includes/config/connect.php' for inclusion (include_path='.;C:\xampp\php\PEAR') in C:\xampp\htdocs\javierescartin.com\includes\classe s\PostDAL.php on line 9

Fatal error: Call to a member function get_results() on a non-object in C:\xampp\htdocs\javierescartin.com\includes\classe s\PostDAL.php on line 19

Haciendo referencia a estas lineas....
//include_once 'includes/config/connect.php';
include("../includes/config/connect.php");
//include 'includes/config/config.php';