Welcome Guest, Not a member yet? Register   Sign In
I can see php codes in html output

I was write my codes in Linux and i'd copy my files into windows (with wamp server) but when i open my project i can see php codes in browser

This is html output of my project.
<title>A site</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">

<link rel="stylesheet" type="text/css" href="<?=base_url()?>theme/theme.css">
<div id="first_div">
<div id="header_div">
  <a href="&lt;?=site_url(">Register</a> - <a href="&lt;?=site_url(">Login</a>  - <a href="&lt;?=site_url(">Logout</a> - <a href="&lt;?=site_url(">New Signal</a>

<div id="container_div"> </div>
<div id="footer_div">Footer text</div>

[eluser]Tom Schlick[/eluser]
do you have php enabled and running? try turning short tags on or in the config have it rewrite the short tags

I changed this line in config

$config['rewrite_short_tags'] = TRUE; (it was false :red: )

My problem is solved now. Thank you for your help.

[eluser]Tom Schlick[/eluser]
not a problem. im glad it was something simple and not some error which we couldnt help solve. now you can use it this way or if you wanna turn on short tags in the php config im pretty sure it will save you some slight resources but thats up to you. good luck with what your working on!

I use short tags too, CI used to advise to turn it on but now they suggest you leave it off and instead of using:


It's advised to do

&lt;?php echo $variable; ?&gt;

But, of course just do what you prefer. I prefer the short-hand of short-tags

Theme © iAndrew 2016 - Forum software by © MyBB