Jump to content
Larry Ullman's Book Forums

LegoMyGeggo

Members
  • Posts

    7
  • Joined

  • Last visited

LegoMyGeggo's Achievements

Newbie

Newbie (1/14)

0

Reputation

  1. Hi Everyone, Just had a quick question regarding chapter 3; script 3.7. More specifically when we're learning about creating functions for ads for the linked webpages. My question relates to when we use the function in relation to when we use the include function. When I add my create_ad() function after I do include(includes/header.html) it prints out "This is an annoying ad!" formatted according to the template. However, if I add the function before the include it just displays it on the top left of the page. So is the reason why it gets formatted because when we use the include function, it is placing the css code within the index.php and then reading the function whereas if I place it before, then technically it would be outside the scope of the included page? Just needed a little clarification, thanks! Best, G
  2. Hey I fixed it some how...not sure but it works now HAHA. Thanks for everything
  3. Hi Larry, Thanks for writing back to me. If I am able to access xampp through the localhost address etc and I get the main xampp page is there something missing?
  4. Yea, it's a php file. I went to the php_error_log and got this, not sure if this is what's causing the problem: [06-Feb-2014 22:16:30 Europe/Berlin] PHP Warning: file_get_contents(lang.tmp): failed to open stream: No such file or directory in C:\xampp\htdocs\xampp\index.php on line 2
  5. Hey Hartley, I'm executing from C:\xampp\htdocs\phptest and just phpinfo.php using <?php phpinfo(); ?>. I am accessing it using the web browser: http://localhost/phptest/phpinfo.php when I use the web browser, it shows just the source code: <?php phpinfo(); ?> I tried changing the file to just be in htdocs and the same result. So I have no idea what I am doing wrong . Also when I access localhost, xampp says that mysql, php etc are active.
  6. Hi Larry & Everyone, I'm trying to follow your book and trying to set up the environment etc, but the huge problem I am running into is that my PHP code isn't executing when I load it into the browser and it just displays the source code. I have scoured around the web and haven't found any solutions to this. Any thoughts and possible help you guys could offer me? Apache seems to be running ok and I dont have any errors in my log (at least doesn't look like it)...what could be the problem? I installed xampp etc.
×
×
  • Create New...