do you have any ideas why the code below or any other code i tried can not run at any browser. i get a blank page <?php $my_string = "Hello Bob. My name is: "; echo "Hi, I'm Bob. Who are you? $my_string Bobetta"; ?> PHP: excuse me if it is a stupid question but i m new at php programming. thank you for your time
If u want to troubleshoot blank pages best thing to do is add this at the top <?php error_reporting(E_ALL); ini_set("display_errors", 1); ?>
Sounds like it might be an apache issue. Consider contacting your host. I've had this before, and it's due to Apache not having the correct permissions to view the file
perhaps create a file called phpinfo.php: and add this snippet: <?php phpinfo(); ?> PHP: Then reply with the a link to its location (on your site), so it'll help us identify what could possibly be going wrong.
Is it possible that your putting the above code or any other code into a html file like index.html whereas it should be .php index.php ?
make a html file, put <?php echo 'hello'; ?> in it and then open the file in your browser Check the source, I bet it is there
Ahh the source is there, but its just a blank page otherwise ? I only said it as the OP has tried different php scripts, all with the same result " a blank page "
I know mate, but he did say he's new to php, I cant remember back when I started, but I am sure I did some silly things at the time, not knowing any better, I guess its how we learn.
Just check this link if you are using localhost. And make sure that your file extension is .php or .php3 or .php4 or .php5 or .phtml because its a silly mistake which anyone can do.
i have already installed xampp, put my file to the localhost root directory and checked the extension of the file (test.php) thank u for the reply