Welcome Guest, Not a member yet? Register   Sign In
Does not render the css and not call the views...
#1

[eluser]Lasher[/eluser]
Hello,
work with CodeIgniter developing websites with PHP and Javascript and bringing work home, when I try to run it on my computer, the call to the header and the banner appears in the browser. As if he was unable to render CSS and call any view with the $this->load->view().

What might be happening?

All settings seem ok.


Thus appears at the top of your browser:
load->view('site/inc/header')?>
load->view('site/inc/menu')?> load->view('site/inc/banner')?>
#2

[eluser]toopay[/eluser]
Code:
// In your view file, you should use
<?php ... ?>
// instead
<?= ... ?>
#3

[eluser]TWP Marketing[/eluser]
Could you post the code from your controller which contains the calls to the loader? It's difficult to guess where the problem lies. It may be an incorrect php starting tag? (just a guess).
[edit] @toopay, you too fast for me <g>
#4

[eluser]Lasher[/eluser]
Thanks for the help. In my work it works perfectly. Why not work here? The only difference is that there use the Windows 7 Professional x64 and here at home the Windows XP x32. Other than that I have not changed anything.

Another thing, when I put the database name and password correctly, it gives an error message saying it could not connect to the database and when I leave the password blank, it happens. It seems that it only renders the HTML, ignoring (or treating as text) all the rest.

I have not changed a single line of code yet. What might be happening?
#5

[eluser]TWP Marketing[/eluser]
Ok, without seeing your code and based on your last post, it would appear to be a difference in the server configurations. That is only a guess...

Also pay attention to what Toopay said above. Your php tags should be the full tag, not the abbreviated version. You save two keystrokes and face compatibility problems with your server.
Code:
&lt;?php
...
your php code
...
?&gt;
...
more html code
Also, be cautious with the closing php tag at the bottom of the page, due to the obscure problem with empty spaces after the tag, it is difficult to debug the problem unless you have seen it before. It's probably not the problem in this particular case, but keep it in mind.
#6

[eluser]InsiteFX[/eluser]
Sounds like you copied it from your work which means nothing is setup for your home system to work!

Like database and all your configuration settings.

And as far as the windows version it makes no difference!

InsiteFX
#7

[eluser]Lasher[/eluser]
Thanks again, I know the problem is not the difference in operating systems. I'll check later at home, this question of tags, it can be. But it weird appears the odd $this->load-view(''); as text on the screen...

And the two are equal, the same bank created with the same settings. All the same, except for the tags.




Theme © iAndrew 2016 - Forum software by © MyBB