Jump to content

No errors, but page not executing...


Alex-Grim

Recommended Posts

Here's my code in the first file:

<?php
$br = "<br/><br/>";
$e = "<h1>ErRoR</h1>";
$myfile = "/includes/classes/MySql.php";

readfile($myfile) OR die("<h1>ErRoR! Content not available!</h1>");
include_once $myfile or die($e);
echo "Page Loaded, and MySql.php included. $br";
?>

dfffffffffggsdfgsdfgsdfg

 

And the result in the first error message, but i'm sure the path is right...

 

Link to comment
Share on other sites

I meant to include this:

display_errors	On	On
display_startup_errors	Off	Off
doc_root	no value	no value
docref_ext	no value	no value
docref_root	no value	no value
enable_dl	On	On
error_append_string	no value	no value
error_log	no value	no value
error_prepend_string	no value	no value
error_reporting	2048	2048

Link to comment
Share on other sites

I could be completely overlooking something in the path (i've been up for 2 days working on a flash website, now this). Here's a screenshot of Gedit, you can see the path in the top, and the file name in the tab -- wel, you know what the hell you're looking at, duh :D (i keep forgetting i'm talking to OTHER LINUX/Unix users for a change).

http://phpbuilder.com/board/attachment.php?attachmentid=3357&d=1197629225

 

 

 

===Edit===

I meant to add, AlexGrim is the root web folder, so the path is relative to that.

One thing i want to ask is, do i have to have my includes folder listed in my includes path (if there is such a thing, which i'm sure there is). This can't be the problem though, because it's saying the file cannot be found even by the readfile() method. I use readfile() for my other site (LinuxIntro.com) to load the content into the Index (only) page, and i don't have anything listed in my include path.

 

Link to comment
Share on other sites

The funny thing is, the leading slash is the shorthand way of saying "webroot", and works for everything else in a website (css, html, javascript, etc), but that got past one error after removing it, thatnx.

 

The next problem is that i'm still not loading the page, and now it stops executing after the readfile() method. Here's the madification i made to the code:

    if (file_exists($myfile))
{
	echo "The file DOES exist. $br";
	include_once($myfile);
	echo "Page Loaded, and MySql.php included. $br";
}

I get the first echo, and nothing else after that.

 

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.