DesignerLost Posted April 2, 2010 Share Posted April 2, 2010 So i'm making a website that's similar to a blog, and i ran into a roadblock with one of the features that i created. the feature that holds all the PDF and word docs isnt showing up in add.php i've been going insane for the past 2 weeks looking at this trying to fix it if anyone can tell me what i did wrong i would really appreciate that :-] add.php <?php // --------------- // INITIALIZE PAGE // --------------- require_once('scripts/sb_functions.php'); global $logged_in; $logged_in = logged_in( true, true ); read_config(); require_once('languages/' . $DL_config[ 'DL_language' ] . '/strings.php'); sb_language( 'add' ); // --------------- // POST PROCESSING // --------------- // ------------ // PAGE CONTENT // ------------ function page_content() { global $lang_string, $DL_config; // SUBJECT $entry_array = array(); $entry_array[ 'subject' ] = $lang_string[ 'title' ]; // PAGE CONTENT BEGIN ob_start(); echo( $lang_string[ 'instructions' ] . '<p />' ); echo( '<hr />' ); sb_editor(); // PAGE CONTENT END $entry_array[ 'entry' ] = ob_get_clean(); // THEME ENTRY echo( theme_staticentry( $entry_array ) ); } // ---- // HTML // ---- ?> <?php echo( get_init_code() ); ?> <?php require_once('themes/' . $DL_theme . '/user_style.php'); ?> <?php require_once('scripts/sb_editor.php'); ?> <title><?php echo($DL_config[ 'DL_title' ]); ?> - <?php echo( $lang_string[ 'title' ] ); ?></title> </head> <?php // ------------ // BEGIN OUTPUT // ------------ theme_pagelayout(); ?> </html> Quote Link to comment https://forums.phpfreaks.com/topic/197322-i-need-help-with-my-php-code/ Share on other sites More sharing options...
DesignerLost Posted April 2, 2010 Author Share Posted April 2, 2010 hmm...it won't let me post all the code so i put them in a .zip file so you can look at it http://www.designerlost.com/files.zip it has add.php sb_editor.php sb_texteditor.php thanks again for helping Quote Link to comment https://forums.phpfreaks.com/topic/197322-i-need-help-with-my-php-code/#findComment-1035699 Share on other sites More sharing options...
ignace Posted April 2, 2010 Share Posted April 2, 2010 Are you getting any errors? Do you have display_errors = On and error_reporting = E_ALL in your php.ini? Quote Link to comment https://forums.phpfreaks.com/topic/197322-i-need-help-with-my-php-code/#findComment-1035790 Share on other sites More sharing options...
DesignerLost Posted April 2, 2010 Author Share Posted April 2, 2010 no errors....just won't show up =[ Quote Link to comment https://forums.phpfreaks.com/topic/197322-i-need-help-with-my-php-code/#findComment-1035953 Share on other sites More sharing options...
KevinM1 Posted April 2, 2010 Share Posted April 2, 2010 What are $logged_in, $lang_string, and $DL_config, and where do they come from? Aside: this is a prime example of why the 'global' keyword is bad. Quote Link to comment https://forums.phpfreaks.com/topic/197322-i-need-help-with-my-php-code/#findComment-1035961 Share on other sites More sharing options...
DesignerLost Posted April 2, 2010 Author Share Posted April 2, 2010 That just makes sure that your logged in and because its made so i can change it often it has to get the layout of the site from a different page Quote Link to comment https://forums.phpfreaks.com/topic/197322-i-need-help-with-my-php-code/#findComment-1035963 Share on other sites More sharing options...
DesignerLost Posted April 3, 2010 Author Share Posted April 3, 2010 i figured it out i had a <php> tag in a <php> tag and they canceled each other out 0_o Quote Link to comment https://forums.phpfreaks.com/topic/197322-i-need-help-with-my-php-code/#findComment-1036278 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.