[SOLVED] No page no error?
07-17-08, 09:32 AM
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?
07-17-08, 09:36 AM
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.
07-17-08, 10:56 AM
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 ');" ); } } } ?>
07-17-08, 11:18 AM
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."
07-17-08, 11:20 AM
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???
07-17-08, 11:26 AM
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.
07-17-08, 11:57 AM
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.
07-17-08, 12:08 PM
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.
07-17-08, 01:37 PM
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.
07-17-08, 06:58 PM
Wannabe Coder
Join Date: Jul 2008
Location: root
Posts: 117
Thanks: 4
Thanked 0 Times in 0 Posts
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
Thread Tools
Display Modes
Linear Mode
Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off