Jump to content

auvi1

New Members
  • Posts

    9
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

auvi1's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. You are my HERO!!! Man thank you so much, this is a total revelation, the way you do it is simply incredible... Thank You, Thank you and finally... THAN YOU! What can I say; you’ve made my day… This is the most incredible Christmas ever. Thank you for your knowledge, thank you for your patience, Thank you for being here. Thank you kenrbnsn for the accurate answer. And Thank you litebearer for the explanation. Grate work. Thank you all.
  2. Here's the strange part... If I call the tree at once, I can oly see the las one, as you can see in the image:attached image. [attachment deleted by admin]
  3. OK... so I did this: <?PHP $myVar = file('ligas.txt'); count($myVar); echo $myVar[0]; /* this shows the first line */ echo $myVar[1]; /* this shows the second line */ echo $myVar[2]; /* this shows the third line */ $notaPrima = $myVar[0]; ?> <?php include ("/dic/breves/"."$notaPrima"); ?> and I get this result in My browser: Warning: include (/dic/breves/58expoliciasdetenidosenjuliosaldranfloresesquerro.html ) [function.include]: failed to open stream: No such file or directory in C:\xampp\htdocs\afn65\2010\AutoFiller.php on line 13 Warning: include() [function.include]: Failed opening '/dic/breves/58expoliciasdetenidosenjuliosaldranfloresesquerro.html ' for inclusion (include_path='.;C:\xampp\php\PEAR') in C:\xampp\htdocs\afn65\2010\AutoFiller.php on line 13 The file exists, I can see that include read the variable perfectly because I can see the string, but it jus doesn't open de darn file... :'(
  4. I don’t understand how it works... where do I put the txt file link, and what var do I use to put in the include? Looks nice and clean.
  5. Hello everybody , it’s so nice to have someone to talk to and someone to rely on. I’ve been trying to put together this reader to populate a page on my site where I can read from a specific line in a text file, this text file contains roots to snippets like feeds that I want to put inside a php include statement so that does chunks of text load in a stack order... hope I’m making any sense, I'm trying but I'm not good whit PHP and just don’t seem to make it work... here’s the problem I have: 1 loader file: <?PHP $myVar = file('text.txt'); count($myVar); include ("$myVar[0]"); // <----- line I want to extract the info from the text.txt file ?> 2. text.txt (urls) 58expoliciasdetenidosenjuliosaldranfloresesquerro.html 60monrcasnoquieren comer.html 100hombrescomencarnedeunjalo.php The problem I have is that if I want to include a second url using the same method, nothing works. I get a message that says: [function.include]: failed to open stream: Invalid argument in etc. etc. But if I only put one line in the text in the text.txt file and only reference on file in the incudes, it works, if I put 5 url's in the text file it only allows me to reads de last on the list and totally ignores de first 4. Also used this and same result: <?PHP $myVar = file('2010/text.txt'); $my2Var = count($myVar ); for($x = 0; $x< $my2Var ; $x++) { } include ("$dic2010"."$myVar [2]"); ?> where $lines[2] is the 3th line on the text.txt file... and that’s the online it reads, if I add a 4th line in the text.txt file it will read the 4th line as long as it's the last in the list and called bye $myVar last line. What I want to do is to be able to load multiple includes in different parts of my index.php will you help me? Pleeeeeeease.
  6. Thank You all, you are grate. jonsjava you did it. Thumbs Up
  7. Hello every one, I'm sure I'm on the right place. Firs, I'm new to php but want to learn, so I'm getting to it, but for now here is my problem. I'm building a website (HTML & CSS mostly) for a Christian group, they give me the bible on a text file... so I suppose I have to put some link (when clicked) to open a PopUp with the correct row from the bible... Inside that text file, data is separated by tabs, here are a few rows from that file to help me better explain myself. --------------------------------------------------------------------------------------------- 1 1 1 1 En el principio creó Dios los cielos y la tierra. 2 1 1 2 Y la tierra estaba desordenada y vacía, y las tinieblas estaban sobre la faz del abismo, y el espíritu de Dios se movía sobre la faz de las aguas. 3 1 1 3 Y dijo Dios: Sea la luz; y fue la luz. 4 1 1 4 Y vio Dios que la luz era buena; y apartó Dios a la luz de las tinieblas. --------------------------------------------------------------------------------------------- The first tab is the order verse # The second tab is the Book name The third tab is the chapter The forth tab is the actual verse # the fifth tab is the actual text of that verse So far this is what I've gotten: $lines = file("biblia/valera1602_1865.txt"); $books = array(1=>"Genesis"); //etc, etc. $l_count = count($lines); foreach($lines as $line) { $parts = explode("\t", $line); $book = $books[$parts[1]]; $chap = $parts[2]; $verse = $parts[3]; $text = $parts[4]; echo "{$book} {$chap}:{$verse} {$text}\n"; } The problem is it outputs the whole bible with genesis as the name of all the books, of course I dont know how to properly create an array of all books and what I need is to retrieve only one book, one chapter and one verse. I know a database is recommended but my Christian friends just feel more closely to the book if they can see it. What I need is to output the verse like this: 1. Ignore first tab 2. Convert the second tab into (a string) the books name (from an array I guess) 3. Output the third and forth tabs next to the outputted string from the second tab with a semicolon in the middle of the third and forth echo string ex. (Genesis 1:1 En el principio creó Dios los cielos y la tierra.) 4. Output the actual verse after the echoed tabs string (like in the example above) I'll attach a couple of files that might help explain myself better. This is possibly a ticket to heaven so there. Can some one help me with this? Thank You for your help [attachment deleted by admin]
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.