deals2000 Posted November 26, 2009 Share Posted November 26, 2009 Hello all, I have AlleyCode HTMP editor but i can't get it to show me my preview in a browser. I have this code and the txt files are not appearing when i try to review my work. Do I need to set up my folders differently or some thing/ Here is the code that works fine when I upload it. Thanks Steve <?Php chmod("content/headline.txt", 0655); chmod("content/subhead.txt", 0655); chmod("content/leadcopy.txt", 0655); chmod("content/list_item_1.txt", 0655); chmod("content/list_item_2.txt", 0655); chmod("content/list_item_3.txt", 0655); chmod("content/list_item_4.txt", 0655); chmod("content/sitename.txt", 0655); chmod("content/meta_keywords.txt", 0655); chmod("content/meta_desc.txt", 0655); chmod("content/template.txt", 0655); chmod("content/font.txt", 0655); chmod("content/template_optin.txt", 0655); chmod("content/footer_info.txt", 0655); chmod("content/opt-in-code.txt", 0655); chmod("content/footer_info.txt", 0655); chmod("content/graphic_headline.txt", 0655); chmod("content/graphic_subhead.txt", 0655); chmod("content/logo_name.txt", 0655); chmod("content/logo_tag.txt", 0655); chmod("content/opt_copy_1.txt", 0655); chmod("content/opt_copy_2.txt", 0655); chmod("content/opt_copy_3.txt", 0655); chmod("content/opt-in-code.txt", 0655); chmod("content/videocode.txt", 0655); chmod("images/logo.png", 0655); chmod("images/graphic_headline.png", 0655); chmod("images/opt_top.png", 0655); $file_if = "layout.txt"; //Path to your *.txt file $contents_if = file($file_if); $layout = implode($contents_if); if ( $layout == "2" ) { header( 'Location: video.php' ); } $file = "content/headline.txt"; //Path to your *.txt file $contents = file($file); $headline = implode($contents); $file2 = "content/subhead.txt"; //Path to your *.txt file $contents2 = file($file2); $subhead = implode($contents2); $file3 = "content/leadcopy.txt"; //Path to your *.txt file $contents3 = file($file3); $leadcopy = implode($contents3); $file4 = "content/list_item_1.txt"; //Path to your *.txt file $contents4 = file($file4); $list_item_1 = implode($contents4); $file5 = "content/list_item_2.txt"; //Path to your *.txt file $contents5 = file($file5); $list_item_2 = implode($contents5); $file6 = "content/list_item_3.txt"; //Path to your *.txt file $contents6 = file($file6); $list_item_3 = implode($contents6); $file7 = "content/list_item_4.txt"; //Path to your *.txt file $contents7 = file($file7); $list_item_4 = implode($contents7); $file8 = "content/sitename.txt"; //Path to your *.txt file $contents8 = file($file8); $sitename = implode($contents8); $file9 = "content/meta_keywords.txt"; //Path to your *.txt file $contents9 = file($file9); $metakeywords = implode($contents9); $file10 = "content/meta_desc.txt"; //Path to your *.txt file $contents10 = file($file10); $metadesc = implode($contents10); $file11 = "content/template.txt"; //Path to your *.txt file $contents11 = file($file11); $active_template = implode($contents11); $file12 = "content/font.txt"; //Path to your *.txt file $contents12 = file($file12); $active_font = implode($contents12); $file13 = "content/template_optin.txt"; //Path to your *.txt file $contents13 = file($file13); $active_optin = implode($contents13); $file14 = "content/footer_info.txt"; //Path to your *.txt file $contents14 = file($file14); $footer_info = implode($contents14); $file15 = "content/opt-in-code.txt"; //Path to your *.txt file $contents15 = file($file15); $optin_code = implode($contents15); ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title><?php echo $sitename; ?></title> <meta name="description" content="<?php echo $metadesc; ?>" /> <meta name="keywords" content="<?php echo $metakeywords; ?>" /> <link href="CSS/<?php echo $active_template; ?><?php echo $active_font; ?>.css" rel="stylesheet" type="text/css" /> <link rel="stylesheet" href="lightbox/css/lightbox.css" type="text/css" /> <script src="lightbox/scripts/prototype.js" type="text/javascript"></script> <script src="lightbox/scripts/lightbox.js" type="text/javascript"></script> <style type="text/css"> <!-- #logo_area { height: 108px; width: 961px; background-image: url(images/logo.png); background-repeat: no-repeat; } #top_optin_area_1 { background-image: url(images/optin_bg1.jpg); background-repeat: no-repeat; height: 264px; width: 394px; padding-right: 9px; padding-left: 9px; } #top_optin_area_2 { background-image: url(images/optin_bg2.jpg); background-repeat: no-repeat; height: 264px; width: 394px; padding-right: 9px; padding-left: 9px; } #top_optin_area_3 { background-image: url(images/optin_bg3.jpg); background-repeat: no-repeat; height: 264px; width: 394px; padding-right: 9px; padding-left: 9px; } #top_optin_area_4 { background-image: url(images/optin_bg4.jpg); background-repeat: no-repeat; height: 264px; width: 394px; padding-right: 9px; padding-left: 9px; } #top_optin_area_5 { background-image: url(images/optin_bg5.jpg); background-repeat: no-repeat; height: 264px; width: 394px; padding-right: 9px; padding-left: 9px; } #top_optin_area_6 { background-image: url(images/optin_bg6.jpg); background-repeat: no-repeat; height: 264px; width: 394px; padding-right: 9px; padding-left: 9px; } #top_optin_area_7 { background-image: url(images/optin_bg7.jpg); background-repeat: no-repeat; height: 264px; width: 394px; padding-right: 9px; padding-left: 9px; } #optin_form_area2 { margin-top: -40px; text-align:center; } --> </style> </head> <body> <div id="main_container"> <div id="logo_area"> </div> <div id="main_content_area"> <div id="headliner"> <img src="images/graphic_headline.png" /> </div> <table border="0"> <tr> <td valign="top" align="left"> <div id="squeeze-content" style="width:450px; padding-right:30px;"> <h2 style="line-height:24px;"><?php echo $headline; ?></h2> <p><span style="background-color:#FFC; line-height:18px; color:#900;"><strong><?php echo $subhead; ?></strong></span></p> <p><?php echo $leadcopy; ?></p> <p style="padding-left:20px;"> <img src="images/bullet_go.png" style="margin-bottom:-3px;" />Â <?php echo $list_item_1; ?></p> <p style="padding-left:20px;"> <img src="images/bullet_go.png" style="margin-bottom:-3px;" />Â <?php echo $list_item_2; ?></p> <p style="padding-left:20px;"> <img src="images/bullet_go.png" style="margin-bottom:-3px;" />Â <?php echo $list_item_3; ?></p> <p style="padding-left:20px;"> <img src="images/bullet_go.png" style="margin-bottom:-3px;" /> <?php echo $list_item_4; ?></p> </div> </td> <td valign="top"> <div id="squeeze"> <div id="top_optin_area_<?php echo $active_optin; ?>"> <img src="images/opt_top.png" /> </div> <div id="optin_form_area2"> <?php echo $optin_code; ?> </div> </div> </td> </tr> </table> <div id="footer_content"> <?php echo $footer_info; ?></div> </div> <div id="footer"> </div> </div> <script type="text/javascript"> var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www."); document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E")); </script> <script type="text/javascript"> try { var pageTracker = _gat._getTracker("UA-10792198-2"); pageTracker._trackPageview(); } catch(err) {}</script> </body> </html> Quote Link to comment Share on other sites More sharing options...
mikesta707 Posted November 26, 2009 Share Posted November 26, 2009 Please use code tags... Do you have a server set up? If not you can't run PHP code. What system are you on? LAMP or WAMP would probably be the easiest setup for you to run Quote Link to comment Share on other sites More sharing options...
deals2000 Posted November 27, 2009 Author Share Posted November 27, 2009 No, I do not have a server set up. I'm just doing the editing on my C: drive in Windows Vista. What can I do ? S Quote Link to comment Share on other sites More sharing options...
Gayner Posted November 27, 2009 Share Posted November 27, 2009 No, I do not have a server set up. I'm just doing the editing on my C: drive in Windows Vista. What can I do ? S Download wampp Quote Link to comment Share on other sites More sharing options...
oni-kun Posted November 27, 2009 Share Posted November 27, 2009 No, I do not have a server set up. I'm just doing the editing on my C: drive in Windows Vista. What can I do ? S WAMP or "WAMPServer" are the only options you can have. PHP requires an engine to parse the code, unlike HTML (only needing the browser) and thus can only be run on a server. WAMP is a simple download that packages Apache, SQLserver and PHP all in one (small download) allowing you to run PHP code in C:\wamp\ht_docs(or www)\ And those files will appear on http://localhost/ , as parsed PHP. Quote Link to comment Share on other sites More sharing options...
deals2000 Posted November 27, 2009 Author Share Posted November 27, 2009 Thank you, that makes it very clear Steve Quote Link to comment Share on other sites More sharing options...
eugene2009 Posted November 27, 2009 Share Posted November 27, 2009 Google xampp, it's a Free open source server with php and mysql support Quote Link to comment 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.