Welcome Guest ( Log In | Register)



 
Reply to this topicStart new topic
> creating a file
lixas
post Jan 11 2005, 08:54 AM
Post #1





Guests






How to write to file such symbols like --> " <-- or --> / <-- and --> < <-- and --> > <--- ?????
Go to the top of the page
 
+Quote Post
lixas
post Jan 11 2005, 08:59 AM
Post #2





Guests






or it is better way to create xml file with such structure:

<?xml version="1.0" encoding="UTF-8"?>
<player showDisplay="yes" showPlaylist="no">
<song path="mp3/Absent_No control.mp3" title= "Absent- No control" />
</player>

i need that scrit read a directory, remove last for symbols (.mp3) and create a file with such structure. in this file only changing filename and filetitle, who is generated from filename
Go to the top of the page
 
+Quote Post
lixas
post Jan 11 2005, 09:02 AM
Post #3





Guests






<?php
$default_dir = "./ist-04";
$fvardas = 'playlist.xml';
if(!($dp = opendir($default_dir))) die("Nepavyksta atidaryti katalogo $default_dir.");
while($file = readdir($dp) ) $filenames[] = $file;
closedir($dp);
$handle = fopen($fvardas, 'w+');

// Write $somecontent to our opened file.
if (file_put_contents($handle, $fvardas) === FALSE) {
echo "Cannot write to file ($fvardas)";
exit;
}
sort($filenames);
for($i=0; $i < count($filenames); $i++)

if($filenames[$i] != '.' && $filenames[$i] != '..'){
$last=substr($filenames[$i], 0, -4);
echo $last;
?><br><?;}?>

this script is not finished
can anyone tell me how to do the xml file, with structure who i wroted in post before ?
Go to the top of the page
 
+Quote Post
God
post Jan 11 2005, 06:18 PM
Post #4





Guests






No idea about the XML, but you can write the " and symbols in php using
CODE
" and
escape sequences. The /, <, and > symbols don't require escape sequesnces, meanign you can just put the symbols in.
Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic

Collapse

> Similar Topics

Topics Topics
  1. 2 Gb Free For File Storage Or Web Hosting(12)
  2. Which File Extension Are You?(48)
  3. creating a programme..(23)
  4. JP is creating accounts (Comments/Suggestion)(24)
  5. Meeko is creating accounts (Comments/Suggestion)(13)
  6. How To Execute sql file to create table(16)
  7. What is file()?(3)
  8. Cpanel-->File Manager(6)
  9. Web Admin (file manager)(7)
  10. file format question(12)
  11. Need: Public_html file...(2)
  12. how to upload a file?(4)
  13. Who all is creating accounts now?(11)
  14. Creating Web Services using Apache Axis-C++(0)
  15. Order followed when creating Web hosting accounts(2)
  1. File size limit?(16)
  2. html imput file(0)
  3. Creating a settings file for your site (PHP)(0)
  4. What files are you supposed to have under file manager?(3)
  5. Loading values in txt file to database(0)
  6. File Urls?(5)
  7. Sig file problems(8)
  8. Before You Start Creating Accounts(2)
  9. Which Forums Would You Prefer?(13)
  10. Full Tutorials For Creating Website...(12)
  11. Need File Host(7)
  12. Will There Be A free Image, File, Video And Flash Host?(5)
  13. Secure File Transfer For Mainframe Systems(2)


 



- Lo-Fi Version Time is now: 30th August 2008 - 02:11 AM