Academic Tutorials



English | French | Portugese | Dutch | Italian
Google

em linha

Home Códigos de fonte E-Livros Downloads Contatar-nos Sobre nós

HTML Tutorials
HTML Tutorial
XHTML Tutorial
CSS Tutorial
TCP/IP Tutorial
CSS 1.0
CSS 2.0
XML Tutorials
XML Tutorial
XSL Tutorial
XSLT Tutorial
DTD Tutorial
Schema Tutorial
XForms Tutorial
XSL-FO Tutorial
XML DOM Tutorial
XLink Tutorial
XQuery Tutorial
XPath Tutorial
XPointer Tutorial
RDF Tutorial
SOAP Tutorial
WSDL Tutorial
RSS Tutorial
WAP Tutorial
Web Services Tutorial
Browser Scripting
JavaScript Tutorial
VBScript Tutorial
DHTML Tutorial
HTML DOM Tutorial
WMLScript Tutorial
E4X Tutorial
Server Scripting
ASP Tutorial
PERL Tutorial
SQL Tutorial
ADO Tutorial
CVS
Python
Apple Script
PL/SQL Tutorial
SQL Server
.NET (dotnet)
Microsoft.Net
ASP.Net
.Net Mobile
C# : C Sharp
ADO.NET
VB.NET
VC++
Multimedia
SVG Tutorial
Flash Tutorial
Media Tutorial
SMIL Tutorial
Photoshop Tutorial
Gimp Tutorial
Matlab
Gnuplot Programming
GIF Animation Tutorial
Scientific Visualization Tutorial
Graphics
Web Building
Web Browsers
Web Hosting
W3C Tutorial
Web Building
Web Quality
Web Semantic
Web Careers
Weblogic Tutorial
SEO
Web Site Hosting
Domain Name
Java Tutorials
Java Tutorial
JSP Tutorial
Servlets Tutorial
Struts Tutorial
EJB Tutorial
JMS Tutorial
JMX Tutorial
Eclipse
J2ME
JBOSS
Programming Langauges
C Tutorial
C++ Tutorial
Visual Basic Tutorial
Data Structures Using C
Cobol
Assembly Language
Mainframe
Forth Programming
Lisp Programming
Pascal
Delphi
Fortran
Oops
Data Ware Housing
CGI Programming
Emacs Tutorial
Gnome
ILU
Soft Skills
Communication Skills
Time Management
Project Management
Team Work
Leadership Skills
Corporate Communication
Negotiation Skills
Database Tutorials
Oracle
MySQL
Operating System
BSD
Symbian
Unix
Internet
IP-Masquerading
IPC
MIDI
Software Testing
Testing
Firewalls
SAP Module
ERP
ABAP
Business Warehousing
SAP Basis
Material Management
Sales & Distribution
Human Resource
Netweaver
Customer Relationship Management
Production and Planning
Networking Programming
Corba Tutorial
Networking Tutorial
Microsoft Office
Microsoft Word
Microsoft Outlook
Microsoft PowerPoint
Microsoft Publisher
Microsoft Excel
Microsoft FrontPage
Microsoft InfoPath
Microsoft Access
Accounting
Financial Accounting
Managerial Accounting
Computer Basics
Basics of Computer


Lima que segura em PHP

Previous Next





Há muitas funções internas em PHP para segurar limas e diretórios. Usando estas funções nós podemos ler, escrever, suprimir, e começar lotes da informação das limas. Para executar todo o funtion em uma lima nós devemos ter a permissão direita que nos permitirá ao manupulate que arquivam.


Criando e suprimindo uma lima

Nós podemos criar uma lima usando o funtion “touch()". ”. O funtion do touch() quando chamado primeiro procurara se a lima especificada existe ou não se o doesnot da lima existe ele cría um com specfied a lima - nome. Para suprimir uma lima nós usamos a função chamada “unlink()”. Este funtion remove a lima que foi emitida como um argumento.

touch(“newinfo.txt”); //create a new file, if it doesn’t already exist
unlink(“oldinfo.txt”); //delete a file


Abrir lima existente

Quando uma lima começou criada, como a alcançar? Nós podemos alcançar uma lima existente que usa o funtion chamado “fopen ()”. Este funtion faz exame de dois argumentos, o primeiro argumento especifica o nome da lima que tem que ser aberta, e o segundo argumento especifica em que modalidade que a lima tem que ser opened.i'e em “ler-r”, “escrever-w” ou ambo modalidade “de leitura/gravação”.

Se a função fopen () a executar com sucesso então retornar um valor do inteiro sabido como um ponteiro de lima. Este valor deve ser armazenado em uma variável. Esta variável é usada trabalhar sobre com a lima aberta. Se o funtion fopen () falhar executar para toda a razão, ele os retornos justos FALSOS. Uma vez que a lima é usada nós devemos fechá-la que usa do “a função fclose ()”. Esta função faz exame somente da lima - nome como o argumento.

$oldfp = fopen(“oldinfo.txt”, “r”); //opens a file for reading
if(!$fp = fopen(“newinfo.txt”, “w”)) //tries to open a file for writing
die(“Error on opening file!”); //terminates the execution of the script if it cannot open the file
fclose($oldfp);


Leitura das limas

Para ler da lima nós usamos o funtion chamado “fgets ()”. Quando este funtion é chamado, lê para fora todos os caráteres até um newline (\ n), ou extremidade de lima (EOF), ou até que um comprimento especificado está alcançado.

A função “fgets ()” é “fgets similares ()”, ao contrário dos fgets () que retorna um único caráter de uma lima. não há nenhuma necessidade especificar nenhum comprimento como um argumento, desde que um caráter é sempre 1 byte.

$text = fgets($fp, 2000); //reads 2000 bytes at most
$chr = fgetc($fp); //reads 1 byte only


Mais lima que segura funções

Há uns muitos de outras funções que você pode se usar com as limas como: testar funciona - “file_exists ()”, “is_file ()”, “is_dir ()”, “is_readable ()”, “is_writeable ()”, “is_executable ()”; funções que informação do retorno em limas: “filesize ()”, “fileatime ()”, “filemtime ()”, “filectime ()”. Você pode figurar para fora o que a função faz pela leitura justa seu nome.

A tabela seguindo contem pouca lima que segura funções e sua descrição

Example Description Preview
chdir Changes PHP's current directory to specified directory. Returns TRUE on success or FALSE on failure.  
chroot Change the root directory  
closedir Closes a directory handle previously opened with opendir(). 
copy Makes a copy of a file. Returns TRUE if the copy succeeded, FALSE otherwise.  
dir dir -- directory class class dir { dir(string directory); string path; resource handl... 
file Returns the contents of a file in an array. 
filesize Gets file size  
fopen Opens a file handle to be used . 
fread Reads the contents of a file descriptor assigned with fopen(). 
fwrite Writes to a file descriptor opened with fopen(). 
getcwd gets the current working directory string. getcwd (void) Returns the current working directory.  
opendir Returns a directory handle that can be used with readdir(), closedir() and rewinddir(). 
readdir Reads the next file from a directory handle opened with opendir(). 
rename Renames a file from the old file name to the new file name.  
rewinddir rewind directory handle, void rewinddir ( resource dir_handle) Resets the directory stream indicated by dir_handle to the beginning of the directory.  
scandir List files and directories inside the specified path  
Unlink Deletes a file. 




Previous Next

Keywords:php tutorial, php scripts, php nuke, php download, php editor, php mysql, php forum, php add link, learn php, php code


HTML Quizes
HTML Quiz
XHTML Quiz
CSS Quiz
TCP/IP Quiz
CSS 1.0 Quiz
CSS 2.0 Quiz
XML Quizes
XML Quiz
XSL Quiz
XSLT Quiz
DTD Quiz
Schema Quiz
XForms Quiz
XSL-FO Quiz
XML DOM Quiz
XLink Quiz
XQuery Quiz
XPath Quiz
XPointer Quiz
RDF Quiz
SOAP Quiz
WSDL Quiz
RSS Quiz
WAP Quiz
Web Services Quiz
Browser Scripting Quizes
JavaScript Quiz
VBScript Quiz
DHTML Quiz
HTML DOM Quiz
WMLScript Quiz
E4X Quiz
Server Scripting Quizes
ASP Quiz
PERL Quiz
SQL Quiz
ADO Quiz
CVS Quiz
Python Quiz
Apple Script Quiz
PL/SQL Quiz
SQL Server Quiz
.NET (dotnet) Quizes
Microsoft.Net Quiz
ASP.Net Quiz
.Net Mobile Quiz
C# : C Sharp Quiz
ADO.NET Quiz
VB.NET Quiz
VC++ Quiz
Multimedia Quizes
SVG Quiz
Flash Quiz
Media Quiz
SMIL Quiz
Photoshop Quiz
Gimp Quiz
Matlab Quiz
Gnuplot Programming Quiz
GIF Animation Quiz
Scientific Visualization Quiz
Graphics Quiz
Web Building  Quizes
Web Browsers Quiz
Web Hosting Quiz
W3C Quiz
Web Building Quiz
Web Quality Quiz
Web Semantic Quiz
Web Careers Quiz
Weblogic Quiz
SEO Quiz
Web Site Hosting Quiz
Domain Name Quiz
Java Quizes
Java Quiz
JSP Quiz
Servlets Quiz
Struts Quiz
EJB Quiz
JMS Quiz
JMX Quiz
Eclipse Quiz
J2ME Quiz
JBOSS Quiz
Programming Langauges Quizes
C Quiz
C++ Quiz
Visual Basic Quiz
Data Structures Using C Quiz
Cobol Quiz
Assembly Language Quiz
Mainframe Quiz
Forth Programming Quiz
Lisp Programming Quiz
Pascal Quiz
Delphi Quiz
Fortran Quiz
Oops Quiz
Data Ware Housing Quiz
CGI Programming Quiz
Emacs Quiz
Gnome Quiz
ILU Quiz
Soft Skills Quizes
Communication Skills Quiz
Time Management Quiz
Project Management Quiz
Team Work Quiz
Leadership Skills Quiz
Corporate Communication Quiz
Negotiation Skills Quiz
Database Quizes
Oracle Quiz
MySQL Quiz
Operating System Quizes
BSD Quiz
Symbian Quiz
Unix Quiz
Internet Quiz
IP-Masquerading Quiz
IPC Quiz
MIDI Quiz
Software Testing Quizes
Testing Quiz
Firewalls Quiz
SAP Module Quizes
ERP Quiz
ABAP Quiz
Business Warehousing Quiz
SAP Basis Quiz
Material Management Quiz
Sales & Distribution Quiz
Human Resource Quiz
Netweaver Quiz
Customer Relationship Management Quiz
Production and Planning Quiz
Networking Programming Quizes
Corba Quiz
Networking Quiz
Microsoft Office Quizes
Microsoft Word Quiz
Microsoft Outlook Quiz
Microsoft PowerPoint Quiz
Microsoft Publisher Quiz
Microsoft Excel Quiz
Microsoft FrontPage Quiz
Microsoft InfoPath Quiz
Microsoft Access Quiz
Accounting Quizes
Financial Accounting Quiz
Managerial Accounting Quiz
Computer Basics Quizes
Basics of Computer Quiz

Privacy Policy
Copyright © 2003-2008 Vyom Technosoft Pvt. Ltd., All Rights Reserved.