I am familiar with the concept of minification in Javascript and how whitespaces contribute to JS file sizes, but does that concept not apply to PHP scripts?
does whitespace make php scripts file sizes larger? can we minify php scripts? or is there no point in doing so because whitespaces in source codes in php does not affect anything ...
PHP make an Admin Area ,to check the User name and Password and then load to another Page
...
i am using PHP 5.3 and i have checked that my fileinfo is enabled. But when i run my code its occurring an error
Fatal error: Call to undefined
function finfo_open()
Anyone can help me to fixed this, here is my code.
$mime=finfo_open(FILEINFO_MIME,filename);
echo "File Type is: ".$mime;
...
Hi!
Zend Mail throws an exception (because mail() returns false) when the to name is set to something with both a foreign character (like "å") and a comma (","). Re-produce with code below.
$mail = new Zend_Mail('utf-8');
$mail
->setFrom('info@myhost', 'My company')
->setSubject('hi')
->addTo('[email protected]', 'aå,a')...
So I have this sample string:
?items=3744130|1^356221|2^356222|1
extracted from a URL:
http://www.example.com/process.php?items=3744130|1^356221|2^356222|1
I need to convert it into this, and for the life of me I'm getting stuck.
?items=model_1=3744130&qty_1=1&model_2=356221&qty_2=2&model_3=356222&qty_3=1
I've gotten this far bu...
I am not sure how to correctly make a fault element in a wsdl file repesenting a PHP exception.
I have created a PHP web service that throws an exception for testing purposes. When I call this web service in a test C# project, I get a reflection exception with the message "Item has already been added. Key in dictionary: 'System.Object'...
In PHP, $_POST add slashes before a quotation mark automatically, so why bother applying mysql_real_escape_string()? For example, when I input 'rrr in an input field, and I get \'rrr when I echo it.
...
I am not able to call a file: "fillDropDown.php". Why this code is not working?
function MakeRequest()
{
var xmlHttp = getXMLHttp();
try
{
xmlHttp.onreadystatechange = function()
{
if (xmlHttp.readyState == 4)
{
HandleResponse(xmlHttp.responseText);
}
}
xmlHttp.open("GET", "filldropdown.php",...
I have a problem where my prepared statement appears to only be returning the number of rows returned rather than the value of the row. Below is my code. I did try google for this but it doesn't tell me anything! If someone could tell me what I am doing wrong and how to fix it I would be very appreciative. Thanks
$query2 = 'SELECT * FRO...
Hello,
I have to insert a row using php's mysql improved library to a table in mysql that has its primary key of type VARBINARY.
The contents of this field are a computed sha1 hash.
If I run the query the old way it works perfectly:
$mysqli->$query("INSERT INTO table (id, field1) VALUES (0x" . $id . ",'" . $field1 . "')");
But when I...
Okay so the array is $nv = array();
$nv[$kk] = $value;
And index key is $kk a variable.
If you have $kk then you can access them as the variables $kk via the index key
$kk?
But what if I did this:
$nv[$kk][$jj] = $value;
I can now access the variables $kk and $jj both assigned to $value, even though they are
index keys, sounds pow...
I'm trying to get a PHP debugger working and currently keep failing at the very first hurdle.
I have a clean installation of IIS7 running on Vista with PHP 5.2.11.
The XDebug section of my PHP.ini looks like:
[XDEBUG]
zend_extension_ts="E:\Program Files\PHP\ext\php_xdebug-2.0.5-5.2.dll"
xdebug.remote_enable=true
xdebug.remote_host=127....
Hi, I need to parse the following xml document (which is coming from external web service):
...
<dati>
<Riconoscimento>
<IdentificativoPosizione>xxxx</IdentificativoPosizione>
<OutputRestituiti>xxx</OutputRestituiti>
</Riconoscimento>
<![CDATA[text text text]]>
</dati>
...
The problem is that until ther...
Hi I have the following code in my change.php page:
$con = mysql_connect("localhost","root","root");
if (!$con)
{
die('Could not connect: ' . mysql_error());
}
mysql_select_db("FACT", $con);
if($_POST['isChecked']==1) // SEE THIS LINE PLEASE
{
mysql_query("UPDATE Orc SET CON = 'CHECKED'
WHERE UID = '1'");
}
...
What is the file? I have php.ini and php.ini-dist on my computer.
...
Could you tell me your way to delete an item from array, do u think it's good?
...
@mysql_select_db(fcs)
or die("Unable to select Database");
//check if the form has been submitted
if(isset($_POST['submit'])){
$msg="";
//VALIDATE form information
if(empty($_POST['uname'])){
$msg="Please enter your username.";
}
if(empty($_POST['upass'])){
$msg .="Please enter your password.";
}
//check l...
$query = "UPDATE kids_entry SET entries=? WHERE parentsemail=?";
$stmt1 = mysqli_prepare($connection, $query);
mysqli_stmt_bind_param($stmt1, 'is',$entries,$parentsemail);
mysqli_execute($stmt1);
if(mysqli_stmt_affected_rows($stmt1) != 1)
die("issueasdass");
mysqli_stmt_close($stmt1);
The above code does work for me on another page b...
I am trying to figure out why I can't include a function into this. I am trying to make it so $client will make it's way into the request string. http://test.com/next.xml?file=$client&test=againtest
$client IS DEFINED as text from my database.
function update($pro){
$request = 'http://test.com/next.xml?file='.$client'&'.'te...
I have two arrays:
array (
'AK_AGE_ASS_VISIBLE' => '1',
'AK_AGE_ASS_COMP' => '0',
.....
)
I want to change the key to another value taking it from another array:
array(
'AK_AGE_ASS_VISIBLE' => 'AGENT_ASSOCIATED',
'AK_AGE_ASS_COMP' => 'AGENT_ASSOCIATED_O',
....
)
The ending array should produce this array:
array(
'AGENT_ASSOCI...