I'm looking for a way to get directory listing for files that are outside the webserver's tree, for example i want to list all files and folders under '/home' directory and put them in an array (just as scandir does).
I can 'sudo su' to a user that has rights to check the directory content but i don't know how to convert a directory lis...
Im working with PHP5, and I need to transform XML in the following form:
<section>
<heading>
<line absolutePage="4" page="2" num="35">A Heading</line>
</heading>
<subsection type="type1">
<heading label="3">
<line absolutePage="4" page="2" num="36">A Subheading</line>
...
If I have a class and want to have some static vars, which would be the correct way to declare them?
For example
class Foo{
public static $var1
public static $var2
public static $var3
......
}
OR
class Foo{
const $var1
const $var2
const $var3
......
}
both ways let me use Foo::var1...
can we use JQ insted of php for developing website. which one is more preferable. I think we can also use JQ for web development.Using JQ we can Execute MySql query like php. Which One is better? and why?
...
Assume I have a CI app that does the following:
Allow users to log in and perform certain tasks
Constantly have cron running scripts in the background
Now, say I need to do some upgrades to the site. How do I do this safely? I don’t want to shut down the server while users are logged in or cron script still running.
I could set a fl...
Hello guys
I am developing an application using zend framework. In the application I have to provide a URL for each user like mydomain.com/[username] then public will be able to view his profile.
[username] is the username of the particular user
But how can I achieve this ? I think in ZF mydomain.com/username tries to get the controll...
I am using zend_navigation for creating menu. Which works fine. Now i m looking if i can take current page and set it as page title using headTitle. Is there is any way to do that?
or
how can i use config files (.ini) for creating Pagetitle and meta data ?
...
One of my clients gave me the following link as a reference for how it is possible to implement same thing in our site. So please help - give me important links that will help me implement this:
http://www.expertclick.com/RssFeed.aspx?type=releases
...
Hi,
I am using Wordpress 3.0.Is it possible to apply different style class to wordpress wp_nav_menu()?
Currently five pages for me and I would like to apply in following order.
<ul>
<h2>
<li><a href="#">Example1</a> </li>
</h2>
<span>
<li><a href="#">Example2</a></li>
</span>
<h4>
<li>...
Hi There! I am currently using PHP 5 with a MysSQL database with 2 tables. So far my PHP Combo Box is working however I need to access the values selected from the combo box. it goes like this:
1) I select a value from the Combo Box.
2) I click on the Submit button
3) The Submit button brings me to another webpage.
The problem that my ...
Hi
I'm looking for a way that I can extract the first letter of each word from an input field and place it into a variable.
Example: if the input field is "Stack-Overflow Questions Tags Users" then the output for the variable should be something like "SOQTU"
Any help is appreciated.
Thanks
...
Hello,
Let me introduce to the situation we had to face it and the core of the question.
We needed in our project to change the "localhost" to be something else like "newdomain-localhost.com", so we changed the hosts file (in Windows) and everything worked.
We reached the wall of Facebook with its sharer, where you need to get the sit...
I have installed pear and when sending mail, I get the following error: Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 6144 bytes) in C:\wamp\www\GamesRus\mail.php on line 2
I am running on windows 7. Here is my code:
$mail = Mail::factory("mail");
$headers = array("From"=>"[email protected]", "Subject"=...
I have the following VBScript code, which I'm converting to PHP:
result = MyLibrary.InitSLibLibrary(cstr(LicsKey))
ScannerErrorAlert result
Can anyone tell me the PHP equivalent of the CStr function used in this code?
...
I'm trying to set an Alias in Apache to use for PHP files where all my PHP scripts reside. Usually, we write:
Alias /php-bin/ "/var/www/php-bin/"
Unfortunately this doesn't work for PHP:
<?php require /php-bin/file.php; ?>
Apache still understands the Alias (I made some tests), PHP however doesn't find the Alias the way it's suppos...
I am trying to loop the below iteration, the code is below and i will try and break it down aswell.
<?php
function intr($LoanRequired, $TermMonths, $MonthlyPayment, $rate) {
$intr= $LoanRequired * pow((1 + $rate), $TermMonths) + $MonthlyPayment * ((pow((1 + $rate), $TermMonths) - 1) / $rate);
return $intr;
}
$x0=0...
I have upload my site on windows server, but when i use .htacess in my site then it is not working. means no page will open it show page not found error. but it is working properly in localhost.I want to know whether windows server support .htaccess(Url rewriting) or not. if it support then how can i enable it on server.
thank you
...
Hi, we've got an almost-finished-ready-to-go magento shop, that has developed an annoying problem.
On the one page checkout, one of the steps has gone missing! The "shipping" tab, despite being present in the array of values inside the Mage_Checkout_Block_Onepage->getSteps() method, doesn't display. We've tried everything to figure out...
Hi ,
Please refer some good shopping inventory application(stock in-stock out application) open source.
Thanks
...
Ok,
I know all about array_pop(), but that deletes the last element. What's the best way to get the last element of an array without deleting it?
EDIT: Here's a bonus:
$array = array('a' => 'a', 'b' => 'b', 'c' => 'c');
or even
$array = array('a', 'b', 'c', 'd');
unset($array[2]);
echo $array[sizeof($array) - 1]; // Output: PHP No...