How can I access static php variable with custom class name. In class c1 method hi() I need to access static variable of its child class. PHP < 5.3
class c1{
function hi(){
$cn=get_class($this);
echo $cn::$b; //need echo 5 here, but error
}
}
class c2 extends c1{
static public $b=5;
}
$c2=new c2();
$c2->hi();
...
How to remove www and validate a valid domain name.
Valid Domain
domain.com
subdomain.domain.com
sub-domain.domain.com
Invalid Domain
www.domain.com
www.subdomain.domain.com
http://www.domain.com/
http://www.subdomain.com/
www.domain.com/folder/
How the code?
$domain ='www.domain.com/folder/';
if() {
// validate here
}
...
I have created a button specific for submitting appeals for punishments.
Here is the page: oldserver.net/button/lookup.php?id=80
It doesn't work like it should... I included test.php inside the main file at lookup.php and it doesn't work at all. Search queries work just fine. It's javascript that is not working right. So I don't kno...
I have worked almost for a year now on PHP. I was using C#.NET for my academic projects. But, i am getting offers to switch to ASP.NET/C# these days. Would leaving my current platform be fruitful? My familiarity with Open Source technologies is deep & couldn't decide what should i do with these offers. Any suggestions? please.
Thank yo...
I have parent class c1 with function hi(). class c2 extends c1 and contains singleton access through method i(). In class c2 I want to make method with the same name as in c1, which I can call in static scope, but in this method I whan to use singleton instance and call method with the same name from parent class.
class c1{
function h...
Hi there,
i have recently started to learn drupal 6. I dont have any previous experience with drupal.
I was asked to implement a page on existing drupal site with the following structure.
a sopping page which will have an thumbail size image with lable and a quantity text box. This pattern will repeat for 10 products. At the end of th...
Hello,
I looked for a workflow engine written in php and found the ez components workflow-classes (http://ezcomponents.org/docs/api/latest/introduction_Workflow.html). After work with the examples I have two general problems with the understanding of the (general) workflow-functionality:
1.) If I have defined a general workflow (for e...
Is there a way get the timezone of a user by their latitude and longitude? And not just the offset, but the actual timezone they're in.
Essentially, I'm searching for the polar opposite of DateTimeZone::getLocation which returns the latitude and longitude for a certain timezone.
...
Hey all,
is there a way to check if the email server is working via PHP?
Thanks.
...
hi,
i use php for coding. is there a way to pass meta in the body part. so that it is recognized by serach engines. i know meta tags needs to be passed in head. but since i am generating pages dynamically . only body part get changed in every page.
...
I am trying to show custom text on the image using dompdf
<div class="image" style="font-size:25px">
<img alt="" src="image-url.jpg" />
<div class="name" style="margin-top: -575px; margin-right: 0; margin-bottom: 0; margin-left: 235px; position: absolute;">
<font face="High Tower Text"><em><?php print $some-value; ?></em></font>...
Hello, my most trusted programmers and thank for all the help!
I grab rss-feed by jquery-ajax using php curl. It's loading very nicely directly on the page. However, I would like to translate the text, that is now html, title within h2 and text within p, wrapped by a div-container.
Google's api-script for translation doesn't seem to ru...
I had a list <li> where the content inside li should get bold when it is clicked. For that i used the following code
HTML
<ul class="tabs">
<li><a href="#tab1" style="padding-left:5px;">All Sectors</a></li>
<li><a href="#tab2">Information Technology</a></li>
<li><a href="#tab3">Manufacturing</a></li>
<...
Hi,
My jQuery code:
$('.Img').click(function() {
alert('Test');
});
$().ready(function() {
$.ajax( {
type : 'POST',
url : 'Post.php',
success : function(Response) {
$('#Response').html(Response);
}
}
});
My HTML code:
<div id="Response"></div>
<img class="Img" src="blan...
I need to parse all data from below XML file. Please guide me how can I do it? How can I put data into a separate variables or array. Like, the value of <p:productid> tag into $pid and value of <p1:devices> into $pdevice?
Here is a sample file:
<?xml version="1.0" encoding="UTF-8"?>
<p:application>
<p1:devices>
<p1:d...
Hi, How do i use a php5 variable inside a system() call
$dir = '/etc/somedir';
eg system("ls $dir")
i think i'm missing something
ok sorry, i am actually passing a variable from a post
eg
$username = $_POST[username];
to a system call
system("processData --user $username --pass $password");
this isn't working, so i trivialised do...
I want to get the page ID before starting the loop in Wordpress. I am using
$page = get_query_var('page_id');
But i returns nothing :(
Apparently I want to check for a page ID and add a class to <body> tag based on it.
...
i thought, that i understand what references do.
but now i meet an example, which can't understand anyway.
i saw an interesting script here, but why he use & in this script i can't understand.
here is the part of script
foreach ($nodeList as $nodeId => &$node)
{
if (!$node['id_parrent'] || !array_key_exists($node['id_parrent'], $n...
Dear all ,I have the sample files below.I can parse data from the simple xml tag.But how can i parse data from this type of xml tag?< p:price >test data< /p:price> or < p1:translation lang="en" type="text" >pls guide..
sample xml file
<?xml version="1.0" encoding="UTF-8"?>
<mynotes>
<note>
<tasks>Task 1</tasks>
<detail...
Hi im trying to build a foreach of sort of , that would extract($_POST) then utf8_decode each post so i dont have to do this manually for each $ variable, is it easy to make such function, im tired..thanks for any help.
...