Current location: Hot Scripts Forums » Programming Languages » PHP » [SOLVED] No page no error?


[SOLVED] No page no error?

Reply
  #1 (permalink)  
Old 07-17-08, 09:32 AM
Hamed Hamed is offline
Wannabe Coder
 
Join Date: Jan 2007
Posts: 188
Thanks: 2
Thanked 0 Times in 0 Posts
[SOLVED] No page no error?

I code script but now I have problem
www.sokoot.ir
I can see anything in my website but it work well in offline version?
Reply With Quote
  #2 (permalink)  
Old 07-17-08, 09:36 AM
Nico's Avatar
Nico Nico is offline
Community Leader
 
Join Date: Sep 2005
Location: Spain
Posts: 8,075
Thanks: 11
Thanked 88 Times in 83 Posts
Add these two lines at the top of your script. Right after the first <?php tag.

PHP Code:

error_reporting(E_ALL);
ini_set('display_errors''1'); 
Reply With Quote
  #3 (permalink)  
Old 07-17-08, 10:56 AM
Hamed Hamed is offline
Wannabe Coder
 
Join Date: Jan 2007
Posts: 188
Thanks: 2
Thanked 0 Times in 0 Posts
I add this but yet I do not get any error.
This is my template system
PHP Code:

<?php

/**
 * @author Hamed
 * @copyright 2008
 */

class template

    public function 
__construct()
    {
    }
    private function 
check($name$templatename)
    {
        global 
$db;
        
$query $db->read("SELECT * FROM $templatename WHERE temname='$name' LIMIT 1");
        if(
$db->nums($query) > 0)
        {
            return 
true;
        }
        else
        {
            return 
false;
        }
    }
    public function 
get($name$templatename)
    {
        global 
$db;
        if(
$this->check($name$templatename))
        {
            
$query $db->read("SELECT * FROM $templatename WHERE temname='$name' LIMIT 1");
            
$tem $db->fetch($query);
            
$code $tem['codes'];
            
$name $tem['temname'];
            
$code "<!-- start: $name -->\n$code\n<!-- end: $name -->";
            
$code str_replace("\\'""'"addslashes($code));
            return 
$code;
        }
        else
        {
            return 
false;
        }
    }
    public function 
add($themename)
    {
        global 
$db;
        
$db->read("CREATE TABLE `$themename` (`tid` INT( 5 ) NOT NULL AUTO_INCREMENT ,`temname` VARCHAR( 100 ) NOT NULL ,`code` TEXT NOT NULL ,PRIMARY KEY ( `tid` )) ENGINE = MYISAM ");
    }
    public function 
insert($name$code$templatename)
    {
        global 
$db;
        if(
$this->check($name$templatename))
        {
            return 
false;
        }
        else
        {
            
$this->read("INSERT INTO `$templatename` (`tid` ,`temname` ,`codes` ) VALUES (NULL , '$name', '$codes');");
        }
    }
}

?>
Reply With Quote
  #4 (permalink)  
Old 07-17-08, 11:18 AM
DAL's Avatar
DAL DAL is offline
Code Master
 
Join Date: Jun 2003
Location: North East England/UK
Posts: 874
Thanks: 0
Thanked 0 Times in 0 Posts
Where do you actually write the contents to the browser?

If you write nothing out then nothing will be displayed and no error will be shown if no error occur.
__________________
"once upon a midnight dreary, while i pron surfed, weak and weary, over many a strange and spurious site of 'hot xxx galore'. While i clicked my fav'rite bookmark, suddenly there came a warning, and my heart was filled with mourning, mourning for my dear amour," 'Tis not possible!", i muttered, "give me back my free hardcore!" quoth the server, 404."
Reply With Quote
  #5 (permalink)  
Old 07-17-08, 11:20 AM
mab's Avatar
mab mab is offline
Community VIP
 
Join Date: Oct 2005
Location: Denver, Co. USA
Posts: 2,674
Thanks: 0
Thanked 0 Times in 0 Posts
What php version is your development system and your online server?

Your code is using php5 specific OOP syntax that would produce fatal parse errors in php4 and would produce a blank page unless error_reporting/display_errors were turned on before your page is requested.
__________________
Error checking, error reporting, and error recovery. If your code does not have these to get it to tell you why it is not working, what makes you think someone in a programming forum will be able to tell you why it is not working???
Reply With Quote
  #6 (permalink)  
Old 07-17-08, 11:26 AM
Hamed Hamed is offline
Wannabe Coder
 
Join Date: Jan 2007
Posts: 188
Thanks: 2
Thanked 0 Times in 0 Posts
After I get template I use echo.
My PHP version is 5.2.4 My website work on my localhost well.
Reply With Quote
  #7 (permalink)  
Old 07-17-08, 11:57 AM
Hamed Hamed is offline
Wannabe Coder
 
Join Date: Jan 2007
Posts: 188
Thanks: 2
Thanked 0 Times in 0 Posts
I have one file by the name Global.php
http://www.sokoot.ir/global.php
I add begin of it.
Reply With Quote
  #8 (permalink)  
Old 07-17-08, 12:08 PM
Nico's Avatar
Nico Nico is offline
Community Leader
 
Join Date: Sep 2005
Location: Spain
Posts: 8,075
Thanks: 11
Thanked 88 Times in 83 Posts
That link doesn't help us, as we can't see the code.
Reply With Quote
  #9 (permalink)  
Old 07-17-08, 01:37 PM
Hamed Hamed is offline
Wannabe Coder
 
Join Date: Jan 2007
Posts: 188
Thanks: 2
Thanked 0 Times in 0 Posts
Nico I send you a PM to see codes.
Reply With Quote
  #10 (permalink)  
Old 07-17-08, 06:58 PM
Codefreek's Avatar
Codefreek Codefreek is offline
Wannabe Coder
 
Join Date: Jul 2008
Location: root
Posts: 117
Thanks: 4
Thanked 0 Times in 0 Posts
link do not work.
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
error in page umarrana PHP 7 10-08-07 05:57 AM
Error reports from Dolphin 5.5 starspangle PHP 1 01-14-07 10:00 AM
Multiple Page PHP Registration form losse PHP 6 06-24-06 10:33 PM
Subdomain 404 error pages Barnz1986 Web Servers 6 05-26-06 09:38 AM
ASP upload prob minority ASP 1 06-27-05 08:35 AM


All times are GMT -5. The time now is 07:50 AM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.