Jump to content

[SOLVED] include() in php


cyber_ghost

Recommended Posts

im one of the noobs of php programming....

  so... please help me a lot... guys....

 

    ::) before include() function work fine....... calling calendars..... and other related page..... but now after i edited.. the page... without even retouching the home page... the function include... losses its function.......... im now currrently working about the real estate commisision system..... and we are currently hosted to yahoo.com...... please help me guys.....

Link to comment
Share on other sites

yes guys.. i already tried other formmating style in include an even like this:

 

 

include "file_name.php";

include 'file_name.php';

include ("file_name.php");

include('file_name.php');

 

 

// the running condition of this system..... runs good and smooth.. but..... all this dumb outputs just started... and i even not retouch of this code..... im the 4th programmer of this system...

 

 

Link to comment
Share on other sites

<? session_start();

 

include("header.php");

 

?>

 

 

 

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

 

<html>

 

<head>

 

<title>Untitled Document</title>

 

<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">

 

<link href="mycss.css" rel="stylesheet" type="text/css">

 

<script type="text/javascript" src="dropdowntab.js">

 

 

 

 

 

 

 

</script>

 

<script language="JavaScript" type="text/JavaScript">

 

<!--

 

function MM_reloadPage(init) {  //reloads the window if Nav4 resized

 

  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {

 

    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}

 

  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();

 

}

 

MM_reloadPage(true);

 

//-->

 

</script>

 

 

 

 

 

<body bgcolor="#EEEEEE">

 

<table width="980" border="0" align="center" cellpadding="0" cellspacing="0">

 

  <tr>

 

    <td bgcolor="#CCCCCC"><table width="100%" border="0" cellspacing="1" cellpadding="10">

 

        <tr>

 

          <td bgcolor="#FFFFFF"><table width="100%" border="0" align="center" cellpadding="5" cellspacing="0" class="text11">

 

             

 

            </table>

 

 

 

 

 

 

 

<table width="950" border="0" align="center" cellpadding="5" cellspacing="0" class="text11">

 

  <tr>

 

    <td width="500" valign="top"><? include "home_bulletin.php";?><br>

 

<? include "calendar_home.php";?>

 

</td>

 

<td width="400" valign="top" height="200"><? include ("home_todays_sked.php"); ?><br>

 

<? include "home_todo.php"; ?>

 

</td>

 

  </tr>

 

</table>

 

 

 

  <?

 

 

 

if ($viewmode=="")

 

{

 

 

 

?>

 

    <?

 

  if ($viewletter=="")

 

  $viewletter="a";

 

  include("lib/contacts_table1.php");

 

  ?>

 

              <br>

 

                  <table width="100%" border="0" cellspacing="0" cellpadding="0">

 

                    <tr>

 

                      <td width="500" valign="top"> <table width="100%" border="0" cellspacing="0" cellpadding="0">

 

                          <tr>

 

                            <td height="200" valign="top"><div style="position: relative; overflow: auto; left: 0px; top:

 

0px; height: 100%; width: 100%; background-color: #FFFFFF; border: 0px

 

solid #000000; ">

 

</div><!-- <iframe width="100%" height="200" src="home_todays_sked.php" frameborder="0" scrolling="yes"></iframe> --></td>

 

<br>

 

 

 

                          </tr>

 

                          <tr>

 

                            <td height="10" valign="top"><img src="images/spacer.gif" width="100%" height="10"></td>

 

                          </tr>

 

                         

 

                        </table>

 

                       

 

                      </td>

 

                      <td width="10" valign="top"><img src="images/spacer.gif" width="10" height="50"></td>

 

                      <td valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="0">

 

                          <tr>

 

                            <td></td>

 

                          </tr>

 

                          <tr>

 

                            <td height="10"><img src="images/spacer.gif" width="100%" height="10"></td>

 

                          </tr>

 

                         

 

                        </table></td>

 

                    </tr>

 

                    <tr>

 

                      <td height="10" colspan="3" valign="top"><img src="images/spacer.gif" width="100%" height="10"></td>

 

                    </tr>

 

                   

 

                  </table>

 

                  <?

 

}

 

  ?>

 

                </td>

 

  </tr>

 

 

 

</table></td>

 

        </tr>

 

 

 

      </table></td>

 

  </tr>

 

 

 

</table>

 

</body>

 

</html>

Link to comment
Share on other sites

please use

 

<?php
if (file_exists(lib/contacts_table1.php)){
include (lib/contacts_table1.php);
echo 'The File Exists In Directory lib';
}
elseif (dir_exists(./lib)){
echo 'The Directory Lib Exists But The File contacts_table1.php Does Not';
}
else 'The Directory Lib And The File contacts_table1.php Do Not Exist On This Root';
?>

Link to comment
Share on other sites

As said before; use this format:

 

please use

 

<?php
if (file_exists(lib/contacts_table1.php)){
include (lib/contacts_table1.php);
echo 'The File Exists In Directory lib';
}
elseif (dir_exists(./lib)){
echo 'The Directory Lib Exists But The File contacts_table1.php Does Not';
}
else 'The Directory Lib And The File contacts_table1.php Do Not Exist On This Root';
?>

 

and put error_reporting(E_ALL); at the top of  the script, and then post here anything you get out.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.