Hello All,
I have a PHP script A which displays data from database.
I have another another script B which gets the content of script A .But I need the content after script A is executed . But this is not happending .
// Script A
enter code here
<?php
session_start();
if(!isset($_SESSION['username']))
{
...
There’s no setTemplate() for components! I know but maybe there is another way to do it ?
(The question seems to be about a php framework: http://www.symfony-project.org/)
...
While randomly browsing my website via Google, I noticed that it was showing up remote redirects as local files. Now this can be both good and bad, but I'm wondering how can I fix this so it doesn't happen?
I'm currently using PHP and header('Location: ... which sends a 302 redirect. Looking over the list of HTTP status codes, I'd take ...
Very simple premise. PHP as a shell script, log into an ftp (any ftp, i tried 2), get into a remote directory, list files, download them to local one. it's not working and it's not producing any meaningful errors. it logs in, it gets a list of files, tries the ftp_get and returns false.
#!/usr/bin/php -q
<?PHP
chdir("/www/cron/");
$se...
The Objective
To read the csv file, and separate each line into an array. The first line (field names) displayed once, and then loop through the remaining data.
I have this function to open and explode the csv file
$myFile = "csv.csv";
$fh = fopen($myFile, 'r');
$theData = fread($fh, filesize($myFile));
fclose($fh);
$csv = explode(","...
Hi friends,
I use CodeIgniter, I'm happy with that, but I have a question.
I build my projects under /www/projectname/beta/... directory, so at my code, at many parts like including some images or css files or etc. I have to make ... src="/projectname/beta/... so when I complete the website, I need to edit so many pages to clear these...
I have about 10,000 products in the product table. I want to retrieve one of those items and display it in a section of a web page which stays the same for that particular day. Something like "Product of the day".
For example, if today I get product_id 100, then all of the visitors should be viewing this product item for today. Tomorrow...
Is there any problem using the '@' while writing the code? and what is the mechanism behind it?
...
Hello,
I'm about to program a mutistep form in my MVC App (Self-made MVC framework) in which no data is to be inserted until the last step is finished.
I got the following issues/questions
I'd really like to find a kind of pattern to solve this problem, is there any?
I want it to be easy the perform a go back action, and get the data...
I need a random 4 digit number
right now im using rand(1000,9999) that always gives me a 4 digit number but i eliminates 0000-0999 as possible results.
how do you pad a random number?
(also this is eventually going to be added to a string do i need to cast the int as a string?)
thanks
...
On a website I am maintaining for a radio station they have a page that displays news articles. Right now the news is posted in an html page which is then read by a php page which includes all the navigation. I have been asked to make this into and RSS feed. How do I do this? I know how to make the XML file but the person who edits the n...
Hi,
I wanted to use the CURL extension for PHP to create some sort of download manager and I was thinking if CURL allowed to implement these 2 features I'm thinking about:
1) Multiple connections or multi-part download just like a normal desktop applications download manager.
2) Constantly update on screen (text or graphical, doesn't ...
Seems like Visual Studio 2010 Beta 2 has PHP syntax highlighting. But is there any way to create PHP files or projects from VS itself? If yes, how can I create one?
P.S. Don't suggest vs.php (jcx.software) please, as I'm looking for it's alternative.
...
I am defining the elements of form in a simple XML structure like so:
<subtab id="page_background" label="Page Background" prefix="page">
<input label="Background color" field="bgcolor" type="color"/>
<input label="Background image" field="bgimage" type="image"/>
<space />
</subtab>
etc.
I have large blocks containing abs...
I have a php page for submitting resumes. once they click submit they info all posts to mail.php
once the mail is sent i would like the user to go back to a different page on the website (where the job opportunity are located)
is is there any sort of command i can use to redirect to a different page after the mail.php is done with its ...
I need a opcode-cache in my project. Also i will use for the datastore (mysql returned row) cache ? Which is the best for you and WHY ?
...
Hello , I'm making a multi language website and i decided to use sessions to remember the current language , overall it works as its supposed to , but there is one bug that i can't fix .
1) i load the page and it displays properly in Bulgaria
2) i add '&lang=en' to test if its working properly , and it does
3) when i remove the '&lang...
in my sphinx source config I have an attribute like so:
sql_attr_multi = uint categories from query; SELECT entry_id, cat_id FROM categories_entries
When querying the sphinx index, is it possible to get only records that do not have a category attribute? As a kludgy fix I have executed a query on the database to find all potential ca...
I was looking for an effective algorithm that can give me a righteous idea of how strong a password is.
I found that several different websites use several different algorithms as I get different password strength ratings on different websites.
...
Hi i'm trying to upload an image using a php script. And whats really weird is i get the following error only in Internet Explorer everywhere else script works fine:
Warning: move_uploaded_file(pictures/) [function.move-uploaded-file]: failed to open stream: Is a directory in /home/tntauto1/public_html/admin_add1.php on line 59
Warning...