Jump to content

Search the Community

Showing results for tags 'fwrite'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


  • Welcome to PHP Freaks
    • Announcements
    • Introductions
  • PHP Coding
    • PHP Coding Help
    • Regex Help
    • Third Party Scripts
    • FAQ/Code Snippet Repository
  • SQL / Database
    • MySQL Help
    • PostgreSQL
    • Microsoft SQL - MSSQL
    • Other RDBMS and SQL dialects
  • Client Side
    • HTML Help
    • CSS Help
    • Javascript Help
    • Other
  • Applications and Frameworks
    • Applications
    • Frameworks
    • Other Libraries
  • Web Server Administration
    • PHP Installation and Configuration
    • Linux
    • Apache HTTP Server
    • Microsoft IIS
    • Other Web Server Software
  • Other
    • Application Design
    • Other Programming Languages
    • Editor Help (PhpStorm, VS Code, etc)
    • Website Critique
    • Beta Test Your Stuff!
  • Freelance, Contracts, Employment, etc.
    • Services Offered
    • Job Offerings
  • General Discussion
    • PHPFreaks.com Website Feedback
    • Miscellaneous

Find results in...

Find results that contain...

Date Created

  • Start


Last Updated

  • Start


Filter by number of...


  • Start





Website URL








Donation Link

Found 4 results

  1. Olá a Todos e um Feliz 2017 Logo Hj dia 01 estou mexendo 1 um projeto meu que fara sucesso! mais to com um básico problema ao criar através do php arquivos .php mesmo bom olhem o código: ele funciona bem mais no criar o arquivo .php ele envia em branco os conteúdos que possui $ Codigo: <?php $filename = "$link/mahsystemcodeconnect.php"; if(file_exists($filename)){ $script = file_get_contents($filename); } else { $script = ""; } //Adciona um texto na página $script = "<?php $conecta = mysql_connect('HOST', 'LOGIN', 'SENHA') or print (mysql_error()); mysql_select_db('BANCO', $conecta) or print(mysql_error()); print 'Conexão e Seleção OK!'; mysql_close($conecta); ?>" . $script; //Escrevendo o texto na página $file = @fopen($filename, "x+"); @fwrite($file, stripslashes($script)); @fclose($file); ?> Arquivo mahsystemcodeconnect.php criado fika assim: <?php = mysql_connect('HOST', 'LOGIN', 'SENHA') or print (mysql_error()); mysql_select_db('BANCO', ) or print(mysql_error()); print 'Conexão e Seleção OK!'; mysql_close(); ?> Faltando as variabes com $ = $conecta e também ate com as letras bagunçadas em vez de 'Conexão e Seleção OK!' fika 'Conexão e Seleção OK!' Obrigado Des de Ja!! alguém pode me ajudar??
  2. this is tricky to explain: I have a raw php script, written by someone else, that sends an email to a list extracted from a CSV file. It requires that certain values in the file be manually edited each time it's used, such as the following: $mail->setFrom('email@email.com', 'From Name'); // <==== change email address, From Name $subject = "Subject Line"; // <==== Adjust this subject $html = ' html here '; // <==== include email html MagicParser_parse("test.csv","myRecordHandler","csv|44|1|34"); // <==== change 'test.csv' file name the function is called by simply calling this email.php file in the browser. I'd like to build a form that would a) edit these values/strings on the fly and then b) call the file in the browser. The thing is, it's been a while since I've messed with PHP forms to any extent, and I can't remember how to get started on something like this. And I'm not familiar at all with fopen and fwrite to edit strings like this without messing up the existing code (there's a lot of other code in the file that needs to be left alone, obviously). I'm hoping someone can help me with a starting point - an idea on how to get this thing going - whether to build the form right in the same file or to build one in another file that posts these values to this existing file... hopefully someone can understand what I'm asking, and thank you much for your help. regards, glenn
  3. Hello... I have problem concerning in php fwrite function... Each time i run the codes, it will add blank spaces/tab for every loop... My screenshot My Codes //create a file $fileCreate = fopen("test.txt","w") or die("Unable to open file!"); foreach ($in_xml_river->item as $item) { $pushData = $item->station_id."::LEVEL\r\n"; fwrite($fileCreate, $pushData); fclose($fileCreate) } Please help me out to solve this issue...thanks
  4. This is what I have: mkdir($username); $file=fopen($username."/index.htm","w"); fwrite($file,"<html>"."</html>"); fclose($file); where $username refers to what the user entered for their username. The .php I'm using this code in is merely for a signup process. I'm extremely new to PHP (like, today), so please go easy on me.
  • 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.