Open harshvardhan-web opened 3 years ago
Well, first your question is not clear. You said, 'when I created a new live server in SQL it doesn't seem to work', so, which live server you created and how? I don't get it.
Anyway, remember one thing, whenever a browser starts downloading a PHP file instead of loading it, that means, your PHP server is not working. Before loading / testing PHP file, make sure you start PHP server.
When I was running my files on local host using xampp the form seemed to work just fine....but when i created a new online database on my sql website with free access it didn't seem to work on github pages......after updating connection.php file with new host name database name password, it seemd to work fine when i ran it again on locahost to check if connection was successful....but when i tried to do the same on github pages the index.html gets loaded...then when i click on anchor tag to take me to the form.php page it downloads the file instead of executing it.
what do you mean by start php server? while testing i tried it on localhost and it worked just fine then when i closed xampp and hosted the form through github pages it didn't work
When I was running my files on local host using xampp the form seemed to work just fine....but when i created a new online database on my sql website with free access it didn't seem to work on github pages......after updating connection.php file with new host name database name password, it seemd to work fine when i ran it again on locahost to check if connection was successful....but when i tried to do the same on github pages the index.html gets loaded...then when i click on anchor tag to take me to the form.php page it downloads the file instead of executing it.
what do you mean by start php server? while testing i tried it on localhost and it worked just fine then when i closed xampp and hosted the form through github pages it didn't work
I think @harshvardhan-web wants to expose his PHP web in GitHub Pages and I have bad news for you: As @jslalriya said "GitHub Pages" does not support PHP. You can see it in this link to the Community GitHub. This is the reason why the PHP sheets are downloaded and not displayed. "GitHub Pages" can only display static code, like HTML, JS, CSS, etc. You can read more at GitHub Docs
Thanks for the answer, I had the same issues with Github Pages. Where should I upload my page when I want to run PHP-Script on my web page?
im facing same issue bro now i have t represent my project on localhost only
Even though its already been late, But it may help someone in future.
Try using different
browser or chrome incognito
mode for opening php
files.
If still its not working, there might be permission issues.
I created a form using php. The home page i.e. index.html has an anchor tag which links to a php file (form.php). Whenever the anchor tag text is clicked the github pages downloads the php file instead of loading it. It worked fine as long as i was doing it on localhost but now when i created a new live server in sql it doesn't seem to work. I have checked for any connection issues to live server and there were none. Any help will be appreciated. Thanks