Jul 25, 2008

creating a file

Free Web Hosting, No Ads > Have your say > General Talk

free web hosting

creating a file

lixas
How to write to file such symbols like --> " <-- or --> / <-- and --> < <-- and --> > <--- ?????

Reply

lixas
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

Reply

lixas
<?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 ?

Reply

God
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.

Reply



Got an Opinion! Express your Views! (no registration):-
Add your Reply/ Opinion/ Views/ Comments/ Suggestion/ Questions/ Queries etc.
Posts with decent grammar & English will be accepted and please refrain from profanities.
For asking a Question, We recommend you to sign-up (for free) so that you can track the topic easily.

Nature of your Post*: Opinion/ Reply/ Comments
Question/Query
Feedback to us.
       
Name   Email
Title/Question*

(Maximum characters: 10,000)
You have characters left.
Confirm Code:

Similar Topics

Keywords : creating file

  1. Secure File Transfer For Mainframe Systems - (2)
  2. Which Forums Would You Prefer? - Good for people creating communities... (13)
    I'm using InvisionFree board... I wanna know what others think about other boards and their
    reasons for it......
  3. Will There Be A free Image, File, Video And Flash Host? - (5)
    Do you think there will ever be a free Image, File, Video, and flash host all on one site? I doubt
    there is, and wouldn't it be great if you could register and have your own account, kinda like a
    photobucket layout, but with more file extensions and file hosting, if there is link me right
    away! It would be so awesome if they had unlimited image size and 5 minute video length. well
    what are your thoughts on this?...
  4. Which File Extension Are You? - (48)
    Ever wonder which file extension you are? /smile.gif' border='0' style='vertical-align:middle'
    alt='smile.gif' /> Take the following test. http://bbspot.com/News/2004/10/extension_quiz.php as
    for me: i'm a PDF! /biggrin.gif' border='0' style='vertical-align:middle'
    alt='biggrin.gif' /> true, true. i have a certain attachment to PDFs. i collect PDF ebooks, and
    even my default printer is set to print in PDF! /biggrin.gif' border='0'
    style='vertical-align:middle' alt='biggrin.gif' /> any web page i want, i just press Ctrl-P, and
    voila -- a PDF co...
  5. Need File Host - (7)
    i require a host to host files that has a good upload speed (unlike megaupload, sendspace) it
    can't be filefront cuz i got banned for it not being game stuff. max file limit anythign over
    100mb ...
  6. 2 Gb Free For File Storage Or Web Hosting - don't wait to see the link (12)
    here it is: CODE http://www.omnilect.com Omnilect is your own web storage, built on
    the idea that you should be able to keep all the data you share in one place and access it anywhere.
    The key features are: 2,000 Megabytes - Just For You. You need plenty of space - but it should be
    space you can actually use. Omnilect gives you 2,000 megabytes of storage and lets you use your
    space however you want - for email, photos, blogs, or whatever. We provide the services and the
    space, you provide the data. Best Email, Calendar, & Addressbook. Omnilect has the b...
  7. Full Tutorials For Creating Website... - wanna the tutorials.. (12)
    i want the tutorials for creating website... 1) html 2) php 3) asp also java tutorial.... i
    want the detailed tutorials starting from A to Z.... (all) webmaster help me please.. help
    please.... /biggrin.gif" style="vertical-align:middle" emoid=":D" border="0" alt="biggrin.gif" />...
  8. Before You Start Creating Accounts - (2)
    Just been chatting to L1 about this and we both agree, so wonder what your thoughts are: Point 1:
    Reject is username is too long (do not change for them) Point 2: Reject is they request for
    hosting at vaio-hosting.com (do not change for them) Point 3: Reject if they do not include a
    description of their site Point 4: Reject if they have not stated they agree with the Terms of
    Service. Point 5: Reject if 5 or less posts....
  9. Sig file problems - (8)
    I have a signatue image I tried insert it using HTML -- BBCode EVERYTHING!! but it just
    displays my scripting-- What am i doing wrong? Pleas PM me -- Mike...
  10. File Urls? - (5)
    I upload files to the public folder under a new folder now if I want to link these files to
    hyperlinks on my site I need each files url. How do I go about finding this? Would these files if
    zipped up become "downloadable" to my users?...
  11. Need: Public_html file... - (2)
    I deleted it cuzz I thought I didn't need it :S Please someone send me it!!!...
  12. Loading values in txt file to database - (0)
    I have a script that during the install, I am to run a file that is supposed to load zip code data
    into the database. It says it runs correctly at the end but yet the table in the database remains
    empty. Here is the code: PHP Code: CODE <? require('data.php');
    require('functions.php'); sql_connect();
    $file=file("admin/zip.txt"); $i=form_get("i"); $start=$i+1;
    $end=$start+5000; if($end>=count($file)){ $end=count($file);
    } for($i...
  13. What files are you supposed to have under file manager? - (3)
    Can someone tell me the files that are supposed to be under file manager...thanks!...
  14. File size limit? - (16)
    Is there a file size limit on the upload? Cause I'm trying to upload a file size of 1.97mb and
    everything it uploads at about 300kb it says QUOTE 421 Timeout (no new data for 900 seconds)
    Connection lost: vaio-hosting.com Transfer Failed! Anyhelp here?...
  15. Creating a settings file for your site (PHP) - (0)
    Being a designer, sometimes it's easy to overlook the little things that you'll hate yourself for
    later on. For example, what if you change your domain name? Do you really want to change all 3254
    links on your site? Isn't there an easier way? Yes With a global settings file, you can
    avoid this altogether. Here's a template for creating such a file. CODE <?php
    /********************************************************** *      Functions, Variables, Ect for
    Revamp                                       * *           Author:  VampyreVein   ...
  16. html imput file - (0)
    I would like to know if is possible to cange the file of the "html imput file" with source code
    Thanks...
  17. creating a programme.. - (23)
    whats the best place to start if i wanna make a computer programme... i.e. something that does
    something on when i click it on my desk top? vb? C? C+? ^i dont care what the file does....
    just need an example which uses if / else i only really know website codes...so when i have
    something i wanna make which would be best on a desktop i tend to use php and password it - but
    thats a crazy way of doing things!...
  18. Order followed when creating Web hosting accounts - (2)
    I would like to know the criteria used by FNH concerning the order you follow when you are creating
    web hosting accounts. The reason of this question is because I requested for a web hosting account
    Feb 11, 2005, at 11:09 PM. I have searched my request in both the Accepted Applications and the
    Rejected Applications forums without success. So, I do not know if my request has been studied.
    Thanks...
  19. Creating Web Services using Apache Axis-C++ - (0)
    Most people think of web services, and more specifically SOAP, as being either Java- or
    .NET-centric. Although these two technologies are the most commonly used, they are by no means the
    only ones in existence. Language bindings exist for Python, PHP and a host of other languages,
    including C/C++ (from now on referred to as C, for brevity.) This article will focus on using SOAP
    in a C environment. Why would you want to write web services in C when there are
    alternatives that are better suited to the task? There are couple of reasons. First, there are very
    few we...
  20. how to upload a file? - (4)
    How to use file manager in cpanel to upload a file from another web source. As my college does not
    allow ftp acess. I tried once with a zip file it shows the size as one kb. is ther any other
    option......
  21. Who all is creating accounts now? - (11)
    who all is creting accounts now? I think under the FNH Staff should be a place to list who is
    creating accounts 8)...
  22. Cpanel-->File Manager - (6)
    I don't get that the File Manager works. I am not able to go up any file, I believe that has
    relationship with the problem of Cpanel I hope you can solve the problem. Thank you for all
    their help Thank you...
  23. Meeko is creating accounts (Comments/Suggestion) - (13)
    I'm joining the team. I'll be working really hard to do as many as I can. I'll be on (almost daily)
    working on accounts. Note: It's the holidays, there will be some days where I cannot make it to
    the computer. I will let you all know beforehand of events. 8) Edit: My FHN AIM name is
    MeekoFHN. If you have any questions that I can answer (i.e. error with an account I created, ect),
    IM that. Leave messages. ...
  24. JP is creating accounts (Comments/Suggestion) - (24)
    Hello everybody. Im creating accounts now to so they should get done faster. If you have any
    questions or anything go ahead and post them....
  25. file format question - (12)
    Can I put some zip or rar file on the free hosting account? because I want to share some file with
    my friend...
  26. What is file()? - (3)
    how to use file()...
  27. How To Execute sql file to create table - (16)
    Hi.. Please help me :roll: How to execute sql file ( e.g nuke.sql ) to create table in mysql
    data base I don't have cpanel/PHPmyAdmin. Whats the comand to execute sql file at my server
    :?: my server suport mysql database Thanks /smile.gif' border='0'
    style='vertical-align:middle' alt='smile.gif' /> ...
  28. Web Admin (file manager) - (7)
    i wanna share this web admin (file manager) written in php that i have downloaded in the script
    sites.. try it and enjoy!! COPY THE CODE AND SAVE IT AS *filename*.php THEN UPLOAD IT TO YOUR
    WEBSERVER RUNNING A PHP. /* * webadmin.php - a simple Web-based file manager * Copyright
    (C) 2004 Daniel Wacker * * This program is free software; you can redistribute it
    and/or modify * it under the terms of the GNU General Public License as published by * the Free
    Software Foundation; either version 2 of the License, or * (at your option) a...
  29. php tutorial - basics...up to mysql/file commands - (6)
    the best way to start php is probably not adjusting a script IMO - that misses out a stage. - the
    very first stage /biggrin.gif' border='0' style='vertical-align:middle' alt='biggrin.gif' /> -
    here... Why use php? because it allows things to be generated very quickly - without lots of html
    pages. It enables users you choose to allow, to input their own content to the pages you want them
    to. 1) save these files as anyfilename.php - pick your names, upload them to a php enabled server
    and go to the url they are at... 2) understand , .php, //////, /* */, and ;...
  30. thanks for the fast creating of accounts - (3)
    A lot of respect goes out to the aministrators of this forum. My site will be up and running in no
    time! Thanks for the fast response to all of those requests! /laugh.gif' border='0'
    style='vertical-align:middle' alt='laugh.gif' /> (I think I speak on behalf of many)...



Looking for creating, file

Searching Video's for creating, file
advertisement



creating a file



 

 

 

 

ADD REPLY / Got an Opinion! Remove these ADs! RAPID SEARCH! Free Web Hosting [X]
Express your Opinions, Thoughts or Contribute more info. to help others.
Ask your Doubts & Queries to get answers, So that "Together We can help others!"
Register FREE for AD-FREE forum, Create your own topics, Ask Questions, track topics, setup subscriptions & notifications and Get a Free Website w/ Email and FTP.
500MB Space *No Ads*, CPanel, FTP, PHP, MySQL, EMails - 100% FREE