Click here to Skip to main content
15,887,214 members
Home / Discussions / Linux, Apache, MySQL, PHP
   

Linux, Apache, MySQL, PHP

 
AnswerRe: hello about Cacti Pin
cjoki19-Oct-10 4:39
cjoki19-Oct-10 4:39 
Questioni catch a problem when i compiling Pin
lxlenovostar18-Oct-10 3:03
lxlenovostar18-Oct-10 3:03 
AnswerRe: i catch a problem when i compiling Pin
Iranian MM8-Sep-11 5:30
Iranian MM8-Sep-11 5:30 
Questionproblem in windows 7 Pin
mstanwar13-Oct-10 14:46
mstanwar13-Oct-10 14:46 
AnswerRe: problem in windows 7 Pin
Mohamed7IBrahim18-Nov-10 3:48
Mohamed7IBrahim18-Nov-10 3:48 
GeneralRe: problem in windows 7 Pin
Ali Al Omairi(Abu AlHassan)13-Feb-11 14:50
professionalAli Al Omairi(Abu AlHassan)13-Feb-11 14:50 
QuestionPHP File Open and Reading character by character Pin
nathionice13-Oct-10 5:33
nathionice13-Oct-10 5:33 
AnswerRe: PHP File Open and Reading character by character Pin
cjoki14-Oct-10 4:44
cjoki14-Oct-10 4:44 
Its how you are handling the variable $output.

1st you assign it a file resource returned from the fopen function.
2nd you use a str_replace on said file resource, not sure why it does not barf here.
3rd the foreach loop requires and array as the first value.

... try replacing the fopen() with file_get_contents() as it will return the entire file contents as a string. Then uncomment the explode which will take the string and replace it with an array. That should allow the foreach to work.

always remember to find out what the return type of a function call is before you use it.
RantRe: PHP File Open and Reading character by character Pin
Macotti20-Oct-10 0:59
Macotti20-Oct-10 0:59 
GeneralRe: PHP File Open and Reading character by character Pin
cjoki20-Oct-10 5:00
cjoki20-Oct-10 5:00 
RantRe: PHP File Open and Reading character by character Pin
Macotti20-Oct-10 15:45
Macotti20-Oct-10 15:45 
GeneralRe: PHP File Open and Reading character by character Pin
cjoki21-Oct-10 7:38
cjoki21-Oct-10 7:38 
AnswerRe: PHP File Open and Reading character by character Pin
Macotti20-Oct-10 1:07
Macotti20-Oct-10 1:07 
AnswerRe: PHP File Open and Reading character by character Pin
solarpowerlightssource22-Oct-10 12:21
solarpowerlightssource22-Oct-10 12:21 
QuestionLogin and registration system using php Pin
Shamol-nahid11-Oct-10 14:24
Shamol-nahid11-Oct-10 14:24 
AnswerRe: Login and registration system using php [modified] Pin
Karthik. A11-Oct-10 15:06
Karthik. A11-Oct-10 15:06 
QuestionLogin Pin
Shamol-nahid11-Oct-10 14:17
Shamol-nahid11-Oct-10 14:17 
AnswerRe: Login Pin
cjoki12-Oct-10 4:34
cjoki12-Oct-10 4:34 
QuestionRe: Login Pin
Macotti20-Oct-10 0:53
Macotti20-Oct-10 0:53 
QuestionAdding Perl Script to .NET web project Pin
iqbalshekh10-Oct-10 22:11
iqbalshekh10-Oct-10 22:11 
AnswerRe: Adding Perl Script to .NET web project Pin
jschell15-Oct-10 8:24
jschell15-Oct-10 8:24 
GeneralRe: Adding Perl Script to .NET web project Pin
iqbalshekh22-Oct-10 1:10
iqbalshekh22-Oct-10 1:10 
Questioni need guides on web upload images+text at the same time for my site Pin
hishamudin10-Oct-10 8:46
hishamudin10-Oct-10 8:46 
AnswerCross-post warning Pin
Peter_in_278010-Oct-10 13:42
professionalPeter_in_278010-Oct-10 13:42 
QuestionHow i can add template to php ? Pin
Honeyboy_209-Oct-10 0:09
Honeyboy_209-Oct-10 0:09 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.