For example I have a filename like this - проба.xml and I am unable to open it from PHP script.
If I setup php script to be in utf-8 than all the text in script is utf-8 thus when I pass this to file_get_contents:
$fname = "проба.xml";
file_get_contents($fname);
I get error that file does not exist. The reason for this is that in Win...
In IE 7 when I click on any javascript link for example
"< a href="#" onclick="toggleGroup(); return false;" id="slick-toggle">View Classrooms"
the page will refresh. This is occuring in a drupal project I inherited. This problem doesn't happen in IE7 when I run the same script outside of drupal.
Even in the drupal admin onclick event...
description like <a href="myexample.com"></a> should return blank
...
Is it posible,
to modify or edit txt file,
if the file's permission is set as 606 ,
via WEB browser ,
by normal users ?
I mean I make a txt file named "1.txt"
The first original contents of the txt file is "PAX is great man"
and then ,I upload this file to server.
I set the permission of the file as 606.
so the general users can n...
Is this old way to explain
for PHP oop, if he use var thing?
for example,
<?php
class person {
var name;
}
?>
...
I've had the same problem with sql for a while and as I sit down to write the same 'brute-force' hack I always use, I figure there MUST be a more efficient way to do what I want to do.
I have tables similar to this:
grades(gradeID, taskID, grade, username, date)
tasks(taskID, task...)
assignment(assignmentID, title...)
assignment_tasks...
After enabling strict warnings in PHP 5.2, I saw a load of strict standards warnings from a project that was originally written without strict warnings:
Strict Standards: Static function Program::getSelectSQL() should not be abstract in Program.class.inc
The function in question belongs to an abstract parent class Program and is de...
<?PHP
print "hello";
?>
I write this code and save as "1.php";
Then I upload this PHP script to my
server.
I have 8 diffrent free hosting server's accounts.
And I noticed that there are 2 types of
server settings.
(1)
"type A"
for exapmle, sqweebs.
We need to set the PHP file permission as 640.
This means that sqweebs server req...
I asked a question yesterday and the answer I got has answered the first part of my problem - I now have a query that generates a list similar to this:
fname, sname, uname, assignment, task, grade
joe, blogs, joe.blogs, 1, 1, 52
joe, blogs, joe.blogs, 1, 2, 58
jim, blogs, jim.blogs, 1, 1, 95
jim, blogs, jim.blogs, 1, 2, 86
amy, blogs, a...
How many percent we need to pass Zend Certifieed PHP5 Exam?
...
I've been developing in PHP for a while now, and I still have not had a task where I've had to use variable variables. Can anyone give me examples where using them is a good idea ? Or were they included in the language just for fun ?
...
Hello Folks.
I'm new to PHP and web scripting in general so this a newb question.
Currently i'm a creating an instance to an object, yet when I call the constructor
the script slienty shuts down... it doesn't call the next function and I don't know why.
Any help would be welcome.
Here is the code.
<?php
class product {
var $ssPro...
Hi friends,
I have created a website, i want to add localisation for this website - multilingual website. I have created this using PHP, javascript and ajax.
I had tried for google language translator API. Is there any other way to do this. Could you please suggest me how to implement this in my website.
...
I'm mucking about with daemons, and wondered how feasible (in terms of memory and cpu usage, and reliability) it is to do this using PHP:
<?php
// Ignore user aborts and allow the script
// to run forever
ignore_user_abort(true);
set_time_limit(0);
$fp = fopen('loop.log', 'w');
fwrite($fp, date('Y-m-d H:i:s') . ' Started' . PHP_EOL);
w...
I thought that I should use JSON for ID/pass storing format once, but I reserched about it, then I finally found that JSON is too difiicult to me, so now I am considering to use CSV.
The CSV file would be like this. File name is id.csv.
aaa_id,aaa_pass
bbb_id,bbb_pass
ccc_id,ccc_pass
Left colum is id, and right colum is password an...
Many programming languages has a coalesce function (example). PHP, sadly, does not.
What would be the most efficient way to implement one in PHP?
...
Just trying to figure out the proper and safer way to execute mathematic operation passed as string. In my scenario it is values fetched from image EXIF data.
After little research I found two way of doing it.
first, using eval:
function calculator1($str){
eval("\$str = $str;");
return $str;
}
second, using create_function:
...
When I use PEAR, it always generates
lots of errors.
How do you guys treating about them?
(1)use PEAR , and just ignore errors.
What is error thing? I can't see them.
(2)use PEAR, but tweak error level,
to they do not generate errors.
(3)Don't use PEAR thing. switch to cakephp.
...
Hey guys, I have a problem (again). This time I am trying to use NuSoap w/ XAMPP 1.7.1 which includes PHP5 and MySQL ... I wrote a soap-client:
<?php
// Pull in the NuSOAP code
require_once('nusoap.php');
// Create the client instance
$client = new soapclient('http://localhost/mysql/helloworld2.php');
// Check for an error
$err = $clien...
This question can be broken up into a couple of parts:
What is the best way to create a registration key for a product in PHP (ie. a person purchases a PHP program and after payment receives an activation key)
I want to be able to store the registration keys on my server (Joomla) and associate the key with my existing users. Then the P...