I have been trying try catch but, I can't get it to work. The code opens a non existing file called "a"
Code: private function fileOpenMethod($filePath, $numberOfLines,$header,$replaceHeader){
try{
$file = file( $filePath);
}catch(file $e){
$e= "the flie path does not work"; //. $e->getMessage();
}
return $e;
}
I am getting an error message on the page but not the one that am trying to generate
Code: Warning: file(a) [function.file]: failed to open stream: No such file or directory in /home/public_html/_Doc/StripFileClass.php on line 15
I am sure it is simple but I am new to try and catch and it is a learning curve blah blah blah.
Can anyone see what I am doing wrong =)
error reporting
hey everyoneI have a production server in which I want error reporting but only on some pagesI haveini_set('display_errors', 1);ini_set('log_errors', 1);ini_set('error_log',
Check Digits and extracting digits
I think I can figure out the code for this but I am having a very hard time getting past the first step. Any suggestions are greatly appreciated.
Comment Mod System Effects all rows...
Sorry if its confusing but here is whats going on: I have a table in a database called comments and there are alot of entries there but can manually be marked flagged with a 1. nevermind how that is
php code generators
AllWhilst enjoying learning a new language i have come accross a number of free code generators out there to assist and save a lot of timecan anyone recommend what are the best free code generators
Call to undefined function mysql_fetch_accoc()
New to php/mysql coding. What's wrong with this sequence, or am I just not seeing to obvious?Getting, "Call to undefined function mysql_fetch_accoc()" at line n, whereline n is referring to
Help with PHP Calendar code...
Hello, I'm new to this forum and I'm glad I found it.I wrote this code for a PHP calendar as an assignment for college.It works fine, but I also want today's day to show in another color and I can't
Simple MySQL script is not working
Hey guys, Just familiarizing myself with PHP and MySQL. I am following along in the O'Reilly book that addresses both topics and has the platypus on the cover. At any rate, I tried typing in chapter 6
Greek characters in php
Hi,I'm making a script and I m using for first time greek characters.I started to write a simple drop down menu that loads some city names from the database. The names are in Greek in the database and
Rss feed question
HiMy blog and my website are different. Am i able to take my rss feed from my blog and place it on the index page of my site using php and how to I do it (do I need soap)?
Adding Different Numbers From MySQL
Basically I have a mysql database with a couple prices as the following:9.999.999.9949.9924.5024.50How can I add these numbers and display the total from a mysql database?