Stats: 3,183,701 members, 7,921,501 topics. Date: Thursday, 15 August 2024 at 07:26 AM |
Nairaland Forum / Science/Technology / Programming / My Php Code Does Not Execute But Displays Code On Browser, (3238 Views)
I Can't Solve This Error On My Php Page... / My Php Code Does Not Execute But Displays Code On Browser, / PHP Code To Insert And Retrieve Images From Mysql Server (2) (3) (4)
My Php Code Does Not Execute But Displays Code On Browser, by Capacchino: 12:22pm On Jun 30, 2016 |
Greetings experts, I am a php beginner. I observed that whatever code I write does not execute on the browser, but the browser displays back whatever I have coded instead of the output. Don't rilly know my way around d problem, I need ur suggestions, pls.. Tnx |
Re: My Php Code Does Not Execute But Displays Code On Browser, by elfico(m): 12:31pm On Jun 30, 2016 |
Capacchino: You are likely not running the code on the server. If you are using xampp, verify that the php file is saved under c:\xampp\apache\htdocs |
Re: My Php Code Does Not Execute But Displays Code On Browser, by damlax: 12:32pm On Jun 30, 2016 |
Are you using lamp or other software or else it won't show on your browser because browsers defaultly read only HTML , CSS |
Re: My Php Code Does Not Execute But Displays Code On Browser, by Capacchino: 12:39pm On Jun 30, 2016 |
Am using wamp server as my local server, and my Php fil is stored c:/wampserver/www/filename |
Re: My Php Code Does Not Execute But Displays Code On Browser, by Capacchino: 12:41pm On Jun 30, 2016 |
elfico: I am using wamp server and my Php file is on c:/wampserver/www/filename.php |
Re: My Php Code Does Not Execute But Displays Code On Browser, by elfico(m): 12:51pm On Jun 30, 2016 |
Capacchino:check for the folder called htdocs in C:\wampserver\ or C:\wampserver\apache. Then move your project there. Are you using an IDE for your coding? |
Re: My Php Code Does Not Execute But Displays Code On Browser, by Capacchino: 12:58pm On Jun 30, 2016 |
elfico: OK. I will try it.. I'm using notepad++ I av moved file to htdocs, its not executing still, code is showing on my browser |
Re: My Php Code Does Not Execute But Displays Code On Browser, by hollyfat(m): 2:38pm On Jun 30, 2016 |
Capacchino: Hope you are using localhost to access your code |
Re: My Php Code Does Not Execute But Displays Code On Browser, by Vstuffs(m): 3:32pm On Jun 30, 2016 |
Try accessing your code like this Localhost /filename.php Save the file inside your htdocs folder in your wamp directory And make sure your Apache is working |
Re: My Php Code Does Not Execute But Displays Code On Browser, by Dlastofmykind(m): 4:49pm On Jun 30, 2016 |
I hope the file is saved as .php and not as .html? |
Re: My Php Code Does Not Execute But Displays Code On Browser, by Capacchino: 4:55pm On Jun 30, 2016 |
hollyfat:Yes I am |
Re: My Php Code Does Not Execute But Displays Code On Browser, by hollyfat(m): 5:09pm On Jun 30, 2016 |
Capacchino:try using http://127.0.0.1 |
Re: My Php Code Does Not Execute But Displays Code On Browser, by Capacchino: 5:32pm On Jun 30, 2016 |
Dlastofmykind:Yes it s saved as. php |
Re: My Php Code Does Not Execute But Displays Code On Browser, by ekeroyal(m): 7:38pm On Jun 30, 2016 |
I have a few questions to ask you OP 1. Is this your first PHP script? 2. If the first answer is no, are other scripts working well? 3. What browser(s) are you using? 4. Did you embed your PHP code in html or just plain PHP code? Try pasting your code here, if you don't mind. |
Re: My Php Code Does Not Execute But Displays Code On Browser, by Capacchino: 10:25pm On Jun 30, 2016 |
Its has been resolved, i just uninstalled and reinstalled wamp server, den I saved on my www folder.. Den used d localhost/foldername/filename.php on d browser... Tnx for all ur suggestions and opinions, i am grateful |
(1) (Reply)
My Journey Into Svelte Development / Shall we discuss Artificial Neural Networks here? / Is It A Cultural Thing For African Websites To Be Ugly And Unusable?
(Go Up)
Sections: politics (1) business autos (1) jobs (1) career education (1) romance computers phones travel sports fashion health religion celebs tv-movies music-radio literature webmasters programming techmarket Links: (1) (2) (3) (4) (5) (6) (7) (8) (9) (10) Nairaland - Copyright © 2005 - 2024 Oluwaseun Osewa. All rights reserved. See How To Advertise. 24 |