todayme Posted March 2, 2007 Share Posted March 2, 2007 What is wrong with this below the php below? Is this how you include files? Your help is appreciated, I am going out tomorrow to get some books on php <? <php include("connectorexit.php"); ?> <html> <head> <meta name="GENERATOR" content="Microsoft FrontPage 5.0"> <meta name="ProgId" content="FrontPage.Editor.Document"> <meta http-equiv="Content-Type" content="text/html; charset=windows-1252"> <title>New Page 9</title> </head> <body> <div align="center"> <center> <table border="1" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="700" id="AutoNumber1" height="517"> <tr> <td width="100%" height="143"> </td> </tr> <tr> <td width="100%" height="22"> </td> </tr> <tr> <td width="100%" height="494"><br> <php include("userdetail.php"); ?> <php include("writeleads.php"); ?> <br> </td> </tr> </table> </center> </div> </body> </html> ?> Link to comment https://forums.phpfreaks.com/topic/40942-got-problems-with-include-file/ Share on other sites More sharing options...
kenrbnsn Posted March 2, 2007 Share Posted March 2, 2007 No, you have an incorrect string "<php". The correct method is: <?php include("connectorexit.php"); ?> Ken Link to comment https://forums.phpfreaks.com/topic/40942-got-problems-with-include-file/#findComment-198262 Share on other sites More sharing options...
boo_lolly Posted March 3, 2007 Share Posted March 3, 2007 No, you have an incorrect string "<php". The correct method is: <?php include("connectorexit.php"); ?> Ken good to know! so, to make sure i understand this correctly, if you include the php tags on the same line, if it isn't a string, then the php won't be processed properly? does it return an error? Link to comment https://forums.phpfreaks.com/topic/40942-got-problems-with-include-file/#findComment-198265 Share on other sites More sharing options...
todayme Posted March 3, 2007 Author Share Posted March 3, 2007 Parse error: syntax error, unexpected '<' in /home/admin/domains/sold.au.com/public_html/test8.php on line 2 I am getting this error above, with the code below the files that are being embeeded are all PHP CODE not HTML can I do this? Or do I have an error in the code below? <? <?php include("connectorexit.php"); ?> <html> <head> <meta name="GENERATOR" content="Microsoft FrontPage 5.0"> <meta name="ProgId" content="FrontPage.Editor.Document"> <meta http-equiv="Content-Type" content="text/html; charset=windows-1252"> <title>New Page 9</title> </head> <body> <div align="center"> <center> <table border="1" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="700" id="AutoNumber1" height="517"> <tr> <td width="100%" height="143"> </td> </tr> <tr> <td width="100%" height="22"> </td> </tr> <tr> <td width="100%" height="494"><br> <?php include("userdetail.php"); ?> <?php include("writeleads.php"); ?> <br> </td> </tr> </table> </center> </div> </body> </html> ?> Link to comment https://forums.phpfreaks.com/topic/40942-got-problems-with-include-file/#findComment-198268 Share on other sites More sharing options...
kenrbnsn Posted March 3, 2007 Share Posted March 3, 2007 No, you can put everything on one line, I just don't like to. Personal preference. You just had the string "<php" on the line which was a meaningless string and would have cause an error. Ken Link to comment https://forums.phpfreaks.com/topic/40942-got-problems-with-include-file/#findComment-198269 Share on other sites More sharing options...
todayme Posted March 3, 2007 Author Share Posted March 3, 2007 If you look at the code right above not the first one I posted I changed it ..........it still had a problem so I removed <? and ?> from the first and last line of the document and it worked............now its reporting errors in the embedded files which when they are all put together in one file work fine.grrrrrrrrrrrrrrrrrrr Was I correct to remove <? and ?> from the first and line of the page above? Link to comment https://forums.phpfreaks.com/topic/40942-got-problems-with-include-file/#findComment-198271 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.