Skip to main content

Home/ dfs201011/ Group items tagged user

Rss Feed Group items tagged

Ismael Romero

Tipos de datos en PHP - Cursos - Programación Web - 0 views

  • PHP es un lenguaje de los denominados de tipo dinámico, lo que significa que una misma variable puede tener tipos ( numero, texto, vector... ) diferentes en distintos momentos. Por esta razón, no soporta la definición de tipos en la declaración de variables sino que el tipo de la variable viene determinado por el contexto en el que se encuentra, veamos un ejemplo:  .dma475 { width: 440px;}/*1*/ 000 001 002 003 004 005 006 007 008 009  <?php// La variable $var1 es un numero ( entero )$var1 = 3;// La variable $var2 es un texto ( cadena de caracteres )$var2 = "9 años";// Si juntamos las variables $var1 y $var2, obtenemos un texto  $var3 = $var1 . $var2; // "39 años"// Si en cambio las sumamos obtendremos un número$var3 = $var1 + $var2; // 12 ( 3 + 9)?> Maximizar  Seleccionar  PHP  Podemos forzar un tipo determinado, con la función settype o ente paréntesis delante de la variable uno de los siguientes tipos de datos:
  • google_protectAndRun("ads_core.google_render_ad", google_handleError, google_render_ad); No has iniciado sesiónConectar al sistema | Registrar usuario   .pestanas-foro { padding: 0px; margin: 0px; list-style: none; margin-top: 20px; } .pestanas-foro .current { border-bottom: 1px solid white; } .pestanas-foro td { padding: 5px; border-right: 1px solid rgb(136, 136, 136); border-bottom: 1px solid rgb(136, 136, 136); border-top: 1px solid rgb(136, 136, 136); } .pestanas-foro td.menu { background: #dddddd url(/images/fondo-tabs.jpg) } .pestanas-foro td a { color: black; } .pestanas-foro .current a { font-weight: bold; } Cursos   Cursos Cuestionarios Curso de PHP Capítulo   function show ( id ) { var user = document.getElementById("user_" + id ); if ( !user.style.display || user.style.display == "block" ) { var disp = "none"; } else { var disp = "block"; } user.style.display = disp ; var coment = document.getElementById("coment_" + id ); coment.style.display = disp ; } 8 votosTipos de datos en PHP PHP (Articulos) | Fecha: 16/04/09VersionesEditar/TraducirEnvía tu artículo >>  google_protectAndRun("ads_core.google_render_ad", google_handleError, google_render_ad);   PHP es un lenguaje de los denominados de tipo dinámico, lo que significa que una misma variable puede tener tipos ( numero, texto, vector... ) diferentes en distintos momentos. Por esta razón, no soporta la d
  • PHP es un lenguaje de los denominados de tipo dinámico, lo que significa que una misma variable puede tener tipos ( numero, texto, vector... ) diferentes en distintos momentos. Por esta razón, no soporta la definición de tipos en la declaración de variables sino que el tipo de la variable viene determinado por el contexto en el que se encuentra, veamos un ejemplo:  .dma475 { width: 440px;}/*1*/ 000 001 002 003 004 005 006 007 008 009  <?php// La variable $var1 es un numero ( entero )$var1 = 3;// La variable $var2 es un texto ( cadena de caracteres )$var2 = "9 años";// Si juntamos las variables $var1 y $var2, obtenemos un texto  $var3 = $var1 . $var2; // "39 años"// Si en cambio las sumamos obtendremos un número$var3 = $var1 + $var2; // 12 ( 3 + 9)?> Maximizar  Seleccionar  PHP  Podemos forzar un tipo determinado, con la función settype o ente paréntesis delante de la variable uno de los siguientes tipos de datos:
  • ...8 more annotations...
  • google_protectAndRun("ads_core.google_render_ad", google_handleError, google_render_ad); No has iniciado sesiónConectar al sistema | Registrar usuario   .pestanas-foro { padding: 0px; margin: 0px; list-style: none; margin-top: 20px; } .pestanas-foro .current { border-bottom: 1px solid white; } .pestanas-foro td { padding: 5px; border-right: 1px solid rgb(136, 136, 136); border-bottom: 1px solid rgb(136, 136, 136); border-top: 1px solid rgb(136, 136, 136); } .pestanas-foro td.menu { background: #dddddd url(/images/fondo-tabs.jpg) } .pestanas-foro td a { color: black; } .pestanas-foro .current a { font-weight: bold; } Cursos   Cursos Cuestionarios Curso de PHP Capítulo   function show ( id ) { var user = document.getElementById("user_" + id ); if ( !user.style.display || user.style.display == "block" ) { var disp = "none"; } else { var disp = "block"; } user.style.display = disp ; var coment = document.getElementById("coment_" + id ); coment.style.display = disp ; } 8 votosTipos de datos en PHP PHP (Articulos) | Fecha: 16/04/09VersionesEditar/TraducirEnvía tu artículo >>  google_protectAndRun("ads_core.google_render_ad", google_handleError, google_render_ad);   PHP es un lenguaje de los denominados de tipo dinámico, lo que significa que una misma variable puede tener tipos ( numero, texto, vector... ) diferentes en distintos momentos. Por esta razón, no soporta la d
  • google_protectAndRun("ads_core.google_render_ad", google_handleError, google_render_ad); No has iniciado sesiónConectar al sistema | Registrar usuario   .pestanas-foro { padding: 0px; margin: 0px; list-style: none; margin-top: 20px; } .pestanas-foro .current { border-bottom: 1px solid white; } .pestanas-foro td { padding: 5px; border-right: 1px solid rgb(136, 136, 136); border-bottom: 1px solid rgb(136, 136, 136); border-top: 1px solid rgb(136, 136, 136); } .pestanas-foro td.menu { background: #dddddd url(/images/fondo-tabs.jpg) } .pestanas-foro td a { color: black; } .pestanas-foro .current a { font-weight: bold; } Cursos   Cursos Cuestionarios Curso de PHP Capítulo   function show ( id ) { var user = document.getElementById("user_" + id ); if ( !user.style.display || user.style.display == "block" ) { var disp = "none"; } else { var disp = "block"; } user.style.display = disp ; var coment = document.getElementById("coment_" + id ); coment.style.display = disp ; } 8 votosTipos de datos en PHP PHP (Articulos) | Fecha: 16/04/09VersionesEditar/TraducirEnvía tu artículo >>  google_protectAndRun("ads_core.google_render_ad", google_handleError, google_render_ad);   PHP es un lenguaje de los denominados de tipo dinámico, lo que significa que una misma variable puede tener tipos ( numero, texto, vector... ) diferentes en distintos momentos. Por esta razón, no soporta la d
  • PHP es un lenguaje de los denominados de tipo dinámico, lo que significa que una misma variable puede tener tipos ( numero, texto, vector... ) diferentes en distintos momentos. Por esta razón, no soporta la definición de tipos en la declaración de variables sino que el tipo de la variable viene determinado por el contexto en el que se encuentra, veamos un ejemplo: 
  • HP es un lenguaje de los denominados de tipo dinámico, lo que significa que una misma variable puede tener tipos ( numero, texto, vector... ) diferentes en distintos momentos. Por esta razón, no soporta la definición de tipos en la declaración de variables sino que el tipo de la variable viene determinado por el contexto en el que se encuentra, veamos un ejemplo: 
  • HP es un lenguaje de los denominados de tipo dinámico, lo que significa que una misma variable puede tener tipos ( numero, texto, vector... ) diferentes en distintos momentos. Por esta razón, no soporta la definición de tipos en la declaración de variables sino que el tipo de la variable viene determinado por el contexto en el que se encuentra, veamos un ejemplo: 
  • HP es un lenguaje de los denominados de tipo dinámico, lo que significa que una misma variable puede tener tipos ( numero, texto, vector... ) diferentes en distintos momentos. Por esta razón, no soporta la definición de tipos en la declaración de variables sino que el tipo de la variable viene determinado por el contexto en el que se encuentra, veamos un ejemplo: 
  • HP es un lenguaje de los denominados de tipo dinámico, lo que significa que una misma variable puede tener tipos ( numero, texto, vector... ) diferentes en distintos momentos. Por esta razón, no soporta la definición de tipos en la declaración de variables sino que el tipo de la variable viene determinado por el contexto en el que se encuentra, veamos un ejemplo: 
  • HP es un lenguaje de los denominados de tipo dinámico, lo que significa que una misma variable puede tener tipos ( numero, texto, vector... ) diferentes en distintos momentos. Por esta razón, no soporta la definición de tipos en la declaración de variables sino que el tipo de la variable viene determinado por el contexto en el que se encuentra, veamos un ejemplo: 
ivan chill

Reseller Backup Scripts? [Archive] - JaguarPC Community - Web Hosting, VPS Hosting, cPa... - 1 views

  • #!/bin/bash # Nightly backup system for home directories and MySQL # databases for websites managed by CPanel. # Author: Kieran O'Shea # Author's Website: www.kieranoshea.com # Support: kieran@kieranoshea.com # License: GPLv2 # USAGE: Place this file inside the directory you want to # put backups in, set it as a CRON job to run and collect # backups from the site(s) you define below at a preset # time each day, or run it manually everytime you want to # take a backup. You can place an unlimited number of sites # and databases to be backed up in the variables below so # long as you follow the convention. It doesn't even matter # if your different domains are hosted in different locations # so long as they are all managed by CPanel. # Prerequisites: # - Linux box with bash shell # - wget installed # Define all the sites you wish to backup in the array below # Domain name and tld only, eg. kieranoshea.com domain=( domain1.com domain2.com ) # Define all the usernames for the above sites in the array # below - keep order consistant! user=( user1 user2 ) # Define all the passwords for the above usernames in the # array below - keep order consistant! If you log on as # reseller or root you can enter the same password in # every array position, but none the less they must be filled. pass=( pass1 pass2 ) # Number of databases in each domain above - keep order # consistant. If you don't wish to backup any databases # for a particular domain, or don't have any for it, place # a 0 in it's position in the array. no_of_db=( 3 1 ) # Database names, exactly as they are in CPanel, in the order # that the domains appear. You may like to log into CPanel # manually and check your database names before filling this # variable in. Number of db names here must match the above # variables also! Eg. all dbs in domain 1 followed by all # dbs in domain 2 etc. You DO NOT need to enter any database # names below for a domain if you have placed a zero for it # in the array above databases=( domain1_datebase1 domain1_datebase2 domain1_datebase3 domain2_datebase1 ) # Thats all folks, save the file, CHMOD it to be executable # by the user who will run it, and you are all set. # Do not edit anything below this point! echo echo "-----------------------------------------------------------------" echo "Kieran's nightly backup system started" echo "-----------------------------------------------------------------" echo "" echo "-----------------------------------------------------------------" echo "Creating a directory in your backup path for tonights backup..." echo "-----------------------------------------------------------------" FOLDER="$(date +%d-%m-%Y)" mkdir $FOLDER cd $FOLDER echo "-------" echo "Done!" echo "-------" echo "" echo "-----------------------------------------------------------------" echo "Creating a directory for every domain to be backed up into..." echo "-----------------------------------------------------------------" count=${#domain } i=0 while [ "$i" -lt "$count" ] do mkdir ${domain[$i]} let "i = $i + 1" done echo "-------" echo "Done!" echo "-------" echo "" echo "-----------------------------------------------------------------" echo "Backing up MySQL databases..." echo "-----------------------------------------------------------------" overall_db_count=0 count=${#domain } i=0 while [ "$i" -lt "$count" ] do cd ${domain[$i]} mkdir databases cd databases start_point=$overall_db_count # start point for iterating over the array of db names let "end_point = $overall_db_count + ${no_of_db[$i]}" # end point to stop iterating (always the overall count!) n=$start_point while [ "$n" -lt "$end_point" ] do wget http://${user[$i]}:${pass[$i]}@www.${domain[$i]}:2082/getsqlbackup/${databases[$n]}.gz let "n = $n + 1" done let "overall_db_count = $overall_db_count + ${no_of_db[$i]}" # increase the overall count to keep a tally cd .. cd .. let "i = $i + 1" done echo "-------" echo "Done!" echo "-------" echo "" echo "-----------------------------------------------------------------" echo "Backing up home directories; this make take some time..." echo "-----------------------------------------------------------------" count=${#domain } i=0 while [ "$i" -lt "$count" ] do cd ${domain[$i]} wget http://${user[$i]}:${pass[$i]}@www.${domain[$i]}:2082/getbackup/backup-${domain[$i]}-$FOLDER.tar.gz cd .. let "i = $i + 1" done echo "-------" echo "Done!" echo "-------" echo "" echo "-----------------------------------------------------------------" echo "All backup tasks completed. Goodnight!" echo "-----------------------------------------------------------------"
  •  
    Cómo hacer el backup de un hosting mediante comandos cpanel
Miguel Ángel Sánchez Hernández

Apache2: Public_html PHP Configuration - 5 views

  • Update 2010-11: Configure PHP for User Directories. There have been more than a couple searches leading here that are similar to "configure PHP virtual hosts". There was a change to the default Apache config introduced in Ubuntu 10.4, Lucid Lynx. There is a message in the /etc/apache2/mods-available/php5.conf file that tells you what to do. REMEMBER: Restart apache and clear your browser's cache after the changes are made. A more detailed description is given at the Ubuntu User-Directory-PHP Wiki. Here is my copy with the (totally unprofessional) hack to get my ".file" files processed as PHP. <IfModule mod_php5.c>   AddHandler application/x-httpd-php .php .html .htm .file   <FilesMatch "\.ph(p3?|tml)$">     SetHandler application/x-httpd-php   </FilesMatch>   <FilesMatch "\.phps$">     SetHandler application/x-httpd-php-source   </FilesMatch>   # To re-enable php in user directories comment the following lines   # (from <IfModule ...> to </IfModule>.) Do NOT set it to On as it   # prevents .htaccess files from disabling it.     #<IfModule mod_userdir.c>     # <Directory /home/*/public_html>     # php_admin_value engine Off     # </Directory>     #</IfModule> </IfModule>
  • Apache2: Virtual Hosts for Clients in Your Private LAN & PHP Configuration Go to the first page Apache2 public_html & Virtual Directories and read the disclaimer. Thanks. Update 2010-11: Configure PHP for User Directories. There have been more than a couple searches leading here that are similar to "configure PHP virtual hosts". There was a change to the default Apache config introduced in Ubuntu 10.4, Lucid Lynx. There is a message in the /etc/apache2/mods-available/php5.conf file that tells you what to do. REMEMBER: Restart apache and clear your browser's cache after the changes are made. A more detailed description is given at the Ubuntu User-Directory-PHP Wiki. Here is my copy with the (totally unprofessional) hack to get my ".file" files processed as PHP. <IfModule mod_php5.c>   AddHandler application/x-httpd-php .php .html .htm .file   <FilesMatch "\.ph(p3?|tml)$">     SetHandler application/x-httpd-php   </FilesMatch>   <FilesMatch "\.phps$">     SetHandler application/x-httpd-php-source   </FilesMatch>   # To re-enable php in user directories comment the following lines   # (from <IfModule ...> to </IfModule>.) Do NOT set it to On as it   # prevents .htaccess files from disabling it.     #<IfModule mod_userdir.c>     # <Directory /home/*/public_html>     # php_admin_value engine Off     # </Directory>     #</IfModule> </IfModule>
Miguel Ángel Sánchez Hernández

Chapter 21. Classical Printing Support - 0 views

  • Add Printer Wizard Driver Installation The printers initially listed in the Samba host's Printers folder accessed from a client's Explorer will have no real printer driver assigned to them. By default this driver name is set to a null string. This must be changed now. The local Add Printer Wizard (APW), run from NT/2000/XP clients, will help us in this task. Installation of a valid printer driver is not straightforward. You must attempt to view the printer properties for the printer to which you want the driver assigned. Open Windows Explorer, open Network Neighborhood, browse to the Samba host, open Samba's Printers folder, right-click on the printer icon, and select Properties.... You are now trying to view printer and driver properties for a queue that has this default NULL driver assigned. This will result in the following error message: “ Device settings cannot be displayed. The driver for the specified printer is not installed, only spooler properties will be displayed. Do you want to install the driver now?” Do not click on Yes! Instead, click on No in the error dialog. Now you will be presented with the printer properties window. From here, the way to assign a driver to a printer is open. You now have the choice of: Select a driver from the pop-up list of installed drivers. Initially this list will be empty. Click on New Driver to install a new printer driver (which will start up the APW). Once the APW is started, the procedure is exactly the same as the one you are familiar with in Windows (we assume here that you are familiar with the printer driver installations procedure on Windows NT). Make sure your connection is, in fact, set up as a user with printer admin privileges (if in doubt, use smbstatus to check for this). If you wish to install printer drivers for client operating systems other than Windows NT x86, you will need to use the Sharing tab of the printer properties dialog. Assuming you have connected with an administrative (or root) account (as named by the printer admin parameter), you will also be able to modify other printer properties such as ACLs and default device settings using this dialog. For the default device settings, please consider the advice given further in Installing Print Drivers Using rpcclient.
ivan chill

Tipos de servidores Samba y el archivo smb.conf - 3 views

  •  
    Aquí se explican los diferentes tipos de servidores que se pueden configurar en Samba y como configurarlos
ivan chill

Installing WordPress « WordPress Codex - 0 views

  • Using the MySQL Client You can create MySQL users and databases quickly and easily by running mysql from the shell. The syntax is shown below and the dollar sign is the command prompt: $ mysql -u adminusername -p Enter password: Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 5340 to server version: 3.23.54 Type 'help;' or '\h' for help. Type '\c' to clear the buffer. mysql> CREATE DATABASE databasename; Query OK, 1 row affected (0.00 sec) mysql> GRANT ALL PRIVILEGES ON databasename.* TO "wordpressusername"@"hostname" -> IDENTIFIED BY "password"; Query OK, 0 rows affected (0.00 sec) mysql> FLUSH PRIVILEGES; Query OK, 0 rows affected (0.01 sec) mysql> EXIT Bye $
    • ivan chill
       
      1. Conectamos al gestor de base de datos y obtenemos una interfaz de comandos desde la que interactuar con él. 2. Creamos una base de datos con CREATE DATABASE 3. Damos todos los privilegios a un usuario (en la misma instrucción se crea el usuario y se le dan privilegios) sobre la base de datos que creamos en el paso anterior. 3. FLUSH PRIVILEGES hace que se apliquen los cambios. 4. Salimos del gestor
ivan chill

Installing WordPress « WordPress Codex - 3 views

  • Step 2: Create the Database and a User
    • ivan chill
       
      2. Creamos a continuación una base de datos
  • Using the MySQL Client
    • ivan chill
       
      Usamos las instrucciones de este enlace para crear la base de datos
  • $ mysql -u adminusername -p Enter password: Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 5340 to server version: 3.23.54 Type 'help;' or '\h' for help. Type '\c' to clear the buffer. mysql> CREATE DATABASE databasename; Query OK, 1 row affected (0.00 sec) mysql> GRANT ALL PRIVILEGES ON databasename.* TO "wordpressusername"@"hostname" -> IDENTIFIED BY "password"; Query OK, 0 rows affected (0.00 sec) mysql> FLUSH PRIVILEGES; Query OK, 0 rows affected (0.01 sec) mysql> EXIT Bye $
    • ivan chill
       
      1. Conectamos al gestor de base de datos y obtenemos una interfaz de comandos desde la que interactuar con él. 2. Creamos una base de datos con CREATE DATABASE 3. Damos todos los privilegios a un usuario (en la misma instrucción se crea el usuario y se le dan privilegios) sobre la base de datos que creamos en el paso anterior. 3. FLUSH PRIVILEGES hace que se apliquen los cambios. 4. Salimos del gestor
  • ...5 more annotations...
  • Step 3: Set up wp-config.php
    • ivan chill
       
      Configuramos los parametros principales de wordpress
    • ivan chill
       
      Con la instalacción actual nos podemos saltar este paso ya que lo podemos hacer vía web
  • Step 4: Upload the files
    • ivan chill
       
      Si no lo hemos hecho antes copiamos los archivos descomprimidos en una subcarpeta (/var/www) del raiz de apache2
  • Step 5: Run the Install Script
    • ivan chill
       
      Accedemos via web al subdirectorio wp-admin/install.php para que se ejecute el script de instalalción. Aparecerá un formulario en el que especificaremos la base de datos, el usuario con privilegios sobre la misma, su contraseña, el equipo sobre el que se ejecuta el gestor de base de datos. Y el prefijo que se le va a poner a las tablas que se van a crear.
  • Finishing installation
    • ivan chill
       
      Terminamos la instalación configurando parámetros del sitio y el usuario administrador del blog
  • Detailed Instructions Step 1: Download and Extract
  •  
    Instrucciones para instalar wordpress 1. Descargamos y descomprimimos
  •  
    Instrucciones para instalar wordpress
José Alonso

Como eliminar una base de datos (necesario para luego probar que la restaurac... - 2 views

Primero debemos de autentificarnos como administradores de la base de datos: user@ubuntu:~$ mysql -u root -p mi_base #Nos solicita la contraseña de la base de datos de la cual el usuario "root" e...

dfs cms seguridad

started by José Alonso on 25 Nov 10 no follow-up yet
ivan chill

Manual split brain recovery - 0 views

  •  
    Recuperación de DRBD ante problemas de sincronización. Split-Brain detected
1 - 10 of 10
Showing 20 items per page